From 641aabd31a4d70ac8665048171b82d02915254cc Mon Sep 17 00:00:00 2001 From: Jiri Kastner Date: Tue, 21 Nov 2017 15:18:14 +0100 Subject: [PATCH] missing defattr for _bindir missed snippet in specfile for python2 only added scripts to setup.py, pflags renamed and added to setup.py update to 0.5 Signed-off-by: Jiri Kastner --- .gitignore | 1 + python-linux-procfs.spec | 77 +++++++++++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 2d7b454..60ceb76 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ python-linux-procfs-0.4.4.tar.bz2 /python-linux-procfs-0.4.5.tar.bz2 /python-linux-procfs-0.4.6.tar.xz /python-linux-procfs-0.4.10.tar.xz +/python-linux-procfs-0.5.1.tar.xz diff --git a/python-linux-procfs.spec b/python-linux-procfs.spec index 614f1c7..c548a57 100644 --- a/python-linux-procfs.spec +++ b/python-linux-procfs.spec @@ -1,18 +1,24 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")} - - +%if 0%{?fedora} +%global with_python3 1 +%else +%global without_python3 1 +%endif Name: python-linux-procfs -Version: 0.4.10 -Release: 4%{?dist} +Version: 0.5.1 +Release: 2%{?dist} License: GPLv2 Summary: Linux /proc abstraction classes Group: System Environment/Libraries -Source: https://www.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz +Source: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz URL: https://rt.wiki.kernel.org/index.php/Tuna BuildArch: noarch -BuildRequires: python-devel +BuildRequires: python2-devel +BuildRequires: python-setuptools +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %global _description\ @@ -24,31 +30,70 @@ Abstractions to extract information from the Linux kernel /proc files. Summary: %summary %{?python_provide:%python_provide python2-linux-procfs} +Requires: python-six + %description -n python2-linux-procfs %_description +%if 0%{?with_python3} +%package -n python3-linux-procfs +Summary: %summary +%{?python_provide:%python_provide python3-linux-procfs} + +Requires: python3-six + +%description -n python3-linux-procfs %_description +%endif + %prep -%setup -q +%autosetup -p1 %build -%{__python} setup.py build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install rm -rf %{buildroot} -%{__python} setup.py install --skip-build --root %{buildroot} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif %clean rm -rf %{buildroot} %files -n python2-linux-procfs %defattr(0755,root,root,0755) -%{python_sitelib}/procfs/ -%defattr(0644,root,root,0755) -%if "%{python_ver}" >= "2.5" -%{python_sitelib}/*.egg-info +%{python2_sitelib}/procfs/ +%if 0%{?without_python3} +%{_bindir}/pflags +%endif +%defattr(0644,root,root,0755) +%{python2_sitelib}/python_linux_procfs*.egg-info +%license COPYING + +%if 0%{?with_python3} +%files -n python3-linux-procfs +%defattr(0755,root,root,0755) +%{_bindir}/pflags +%{python3_sitelib}/procfs/ +%defattr(0644,root,root,0755) +%{python3_sitelib}/python_linux_procfs*.egg-info +%license COPYING %endif -%doc COPYING %changelog +* Tue Nov 21 2017 Jiri Kastner - 0.5.1-2 +- missing defattr for _bindir + +* Tue Nov 21 2017 Jiri Kastner - 0.5.1-1 +- missed snippet in specfile for python2 only +- added scripts to setup.py, pflags renamed and added to setup.py + +* Mon Nov 20 2017 Jiri Kastner - 0.5-1 +- update to 0.5 + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.4.10-4 - Python 2 binary package renamed to python2-linux-procfs See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 diff --git a/sources b/sources index 240b903..318d190 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-linux-procfs-0.4.10.tar.xz) = 644685b731ed799b96b41ddc58b7c9be8469a43d8740952e56bf9bd36cb8bff171d8f13c61b426503cd851afa9e9957a85d82e2c686c83dd6fd19053dec840c5 +SHA512 (python-linux-procfs-0.5.1.tar.xz) = ec18b794626455c2c4ff76b30a9b56a83276e5b5b79bf7d41eddf30e4e74101efa277973586348eeb3717730fc0db57eec150cd6e3ca117a33b305c133cab665