Put the python2 package back for EPEL6 and 7.
This doesn't change anything on rawhide or f29, and nothing has been built yet for EPEL, so I'm not bumping the release number.
This commit is contained in:
parent
0541ed1fe9
commit
3092267925
9
python-pid-remove-nose-requirement.patch
Normal file
9
python-pid-remove-nose-requirement.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
diff -purN pid-2.1.1.orig/setup.py pid-2.1.1/setup.py
|
||||||
|
--- pid-2.1.1.orig/setup.py 2016-10-05 18:22:33.000000000 -0400
|
||||||
|
+++ pid-2.1.1/setup.py 2019-01-24 10:59:54.225382061 -0500
|
||||||
|
@@ -54,5 +54,4 @@ setup(
|
||||||
|
packages=["pid"],
|
||||||
|
install_requires=[],
|
||||||
|
test_suite='nose.collector',
|
||||||
|
- setup_requires=['nose>=1.0'],
|
||||||
|
)
|
@ -1,5 +1,19 @@
|
|||||||
%global srcname pid
|
%global srcname pid
|
||||||
|
|
||||||
|
# Build python3 for EPEL7, but not 6
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
|
%bcond_with python3
|
||||||
|
%else
|
||||||
|
%bcond_without python3
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Do not build python2 for EPEL > 7, Fedora > 28
|
||||||
|
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
|
||||||
|
%bcond_with python2
|
||||||
|
%else
|
||||||
|
%bcond_without python2
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 2.1.1
|
Version: 2.1.1
|
||||||
Release: 9%{?dist}
|
Release: 9%{?dist}
|
||||||
@ -9,6 +23,10 @@ License: ASL 2.0
|
|||||||
URL: https://pypi.python.org/pypi/%{srcname}
|
URL: https://pypi.python.org/pypi/%{srcname}
|
||||||
Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Remove the nose requirement. nose >= 1.0 is not available in EL6, and it's
|
||||||
|
# only needed to run the testsuite
|
||||||
|
Patch0: python-pid-remove-nose-requirement.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -21,16 +39,17 @@ pid provides a PidFile class that manages PID files. PidFile features:
|
|||||||
|
|
||||||
PidFile can also be used as a context manager or a decorator.
|
PidFile can also be used as a context manager or a decorator.
|
||||||
|
|
||||||
%package -n python3-%{srcname}
|
%if %{with python2}
|
||||||
|
%package -n python2-%{srcname}
|
||||||
Summary: PID file management library
|
Summary: PID file management library
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python-nose
|
||||||
|
|
||||||
%{?python_provide:%python_provide python3-%{srcname}}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
|
|
||||||
%description -n python3-%{srcname}
|
%description -n python2-%{srcname}
|
||||||
pid provides a PidFile class that manages PID files. PidFile features:
|
pid provides a PidFile class that manages PID files. PidFile features:
|
||||||
- stale detection
|
- stale detection
|
||||||
- locking using fcntl
|
- locking using fcntl
|
||||||
@ -39,25 +58,79 @@ pid provides a PidFile class that manages PID files. PidFile features:
|
|||||||
- custom exceptions
|
- custom exceptions
|
||||||
|
|
||||||
PidFile can also be used as a context manager or a decorator.
|
PidFile can also be used as a context manager or a decorator.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%package -n python%{python3_pkgversion}-%{srcname}
|
||||||
|
Summary: PID file management library
|
||||||
|
|
||||||
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
|
BuildRequires: python%{python3_pkgversion}-nose
|
||||||
|
|
||||||
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-%{srcname}
|
||||||
|
pid provides a PidFile class that manages PID files. PidFile features:
|
||||||
|
- stale detection
|
||||||
|
- locking using fcntl
|
||||||
|
- chmod (default is 0o644)
|
||||||
|
- chown
|
||||||
|
- custom exceptions
|
||||||
|
|
||||||
|
PidFile can also be used as a context manager or a decorator.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version}
|
# This needs to have a blank line after because of a bug in the EL6 macros
|
||||||
|
%autosetup -p1 -n %{srcname}-%{version}
|
||||||
|
|
||||||
rm -rf *.egg-info
|
rm -rf *.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with python2}
|
||||||
|
%py2_build
|
||||||
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
%py3_build
|
%py3_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{with python2}
|
||||||
|
%py2_install
|
||||||
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
%py3_install
|
%py3_install
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python3} setup.py test
|
%if %{with python2}
|
||||||
|
# Skip the test suite on EL6, nose is too old
|
||||||
|
%if 0%{?rhel} <= 6
|
||||||
|
%else
|
||||||
|
%{__python2} setup.py test
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python3-%{srcname}
|
%if %{with python3}
|
||||||
|
%{__python3} setup.py test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
|
%files -n python2-%{srcname}
|
||||||
|
%license LICENSE
|
||||||
|
%doc AUTHORS CHANGELOG README.rst
|
||||||
|
%{python2_sitelib}/pid
|
||||||
|
%{python2_sitelib}/pid*.egg-info*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files -n python%{python3_pkgversion}-%{srcname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc AUTHORS CHANGELOG README.rst
|
%doc AUTHORS CHANGELOG README.rst
|
||||||
%{python3_sitelib}/pid
|
%{python3_sitelib}/pid
|
||||||
%{python3_sitelib}/pid-*.egg-info
|
%{python3_sitelib}/pid-*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-9
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-9
|
||||||
|
Loading…
Reference in New Issue
Block a user