Re-add dependency on python-hgdistver, see bz#1208984.

- Apply updated Python packaging guidelines.
- Mark LICENSE with %license.
epel9
Thomas Moschny 10 years ago
parent 336e7cc0e7
commit fce61ade58

@ -1,12 +0,0 @@
diff -up execnet-1.3.0/setup.py.orig execnet-1.3.0/setup.py
--- execnet-1.3.0/setup.py.orig 2015-03-08 12:38:03.021618008 +0100
+++ execnet-1.3.0/setup.py 2015-03-08 12:45:21.326035058 +0100
@@ -63,7 +63,7 @@ def main():
setup_requires=[
# this is a setup/release time dependency
# we are supposed to use wheels
- 'hgdistver',
+ #'hgdistver',
]
)

@ -1,15 +1,17 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
%if 0%{?fedora}
%global with_python3 1
%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
%endif
%global srcname execnet
Name: python-%{srcname}
Version: 1.3.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Elastic Python Deployment
Group: Development/Languages
# package is now under the MIT license, (although the docs still say
@ -20,8 +22,6 @@ URL: http://codespeak.net/execnet
Source0: http://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz
# pytest is too old in EL7 - this patch removes the failing @needssymlink decorator
Patch2: python-execnet-needssymlink.patch
# hgdistver is only needed by upstream at release time
Patch3: python-execnet-remove-hgdistver-dep.patch
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
@ -30,6 +30,7 @@ BuildRequires: pytest
BuildRequires: python-sphinx
BuildRequires: /bin/ps
BuildRequires: python-eventlet
BuildRequires: python-hgdistver
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
BuildRequires: python-gevent >= 1.0
%endif
@ -37,6 +38,7 @@ BuildRequires: python-gevent >= 1.0
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-hgdistver
# these do not exist
#BuildRequires: python3-eventlet
#BuildRequires: python3-gevent
@ -76,70 +78,98 @@ minimal and fast API targetting the following uses:
%prep
%setup -q -n %{srcname}-%{version}
%setup -qc -n %{srcname}-%{version}
mv %{srcname}-%{version} python2
pushd python2
%patch2 -p1
%patch3 -p1
# remove shebangs and fix permissions
find . -type f -a \( -name '*.py' -o -name 'py.*' \) \
-exec sed -i '1{/^#!/d}' {} \; \
-exec chmod u=rw,go=r {} \;
popd
%if 0%{?with_python3}
cp -a . %{py3dir}
cp -a python2 python3
%endif # with_python3
%build
%{__python} setup.py build
pushd python2
%{__python2} setup.py build
make -C doc html
popd
%if 0%{?with_python3}
pushd %{py3dir}
pushd python3
%{__python3} setup.py build
make -C doc html
popd
%endif # with_python3
%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
pushd python2
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
# remove hidden file
rm doc/_build/html/.buildinfo
popd
%if 0%{?with_python3}
pushd %{py3dir}
pushd python3
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
# remove hidden file
rm doc/_build/html/.buildinfo
popd
%endif # with_python3
# remove hidden file
rm doc/_build/html/.buildinfo
%check
pushd python2
PYTHONPATH=$(pwd) LC_ALL="en_US.UTF-8" \
py.test-%{python_version} -r s -k'-test_stdouterrin_setnull' testing
py.test-%{python2_version} -r s -k'-test_stdouterrin_setnull' testing
popd
%if 0%{?with_python3}
pushd %{py3dir}
pushd python3
PYTHONPATH=$(pwd) LC_ALL="en_US.UTF-8" \
py.test-%{python3_version} -r s testing
py.test-%{python3_version} -r s -k'-test_stdouterrin_setnull' testing
popd
%endif # with_python3
%files
%{python_sitelib}/%{srcname}*
%doc README.txt LICENSE CHANGELOG
%doc doc/_build/html
%{python2_sitelib}/%{srcname}*
%doc python2/README.txt
%doc python2/CHANGELOG
%doc python2/doc/_build/html
%if 0%{?_licensedir:1}
%license python2/LICENSE
%else
%doc python2/LICENSE
%endif # licensedir
%if 0%{?with_python3}
%files -n python3-execnet
%{python3_sitelib}/%{srcname}*
%doc README.txt LICENSE CHANGELOG
%doc doc/_build/html
%doc python3/README.txt
%doc python3/CHANGELOG
%doc python3/doc/_build/html
%if 0%{?_licensedir:1}
%license python3/LICENSE
%else
%doc python3/LICENSE
%endif # licemsedir
%endif # with_python3
%changelog
* Mon Apr 20 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.0-2
- Re-add dependency on python-hgdistver, see bz#1208984.
- Apply updated Python packaging guidelines.
- Mark LICENSE with %%license.
* Sun Mar 8 2015 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.0-1
- Update to 1.3.0.
- Drop obsolete patches.

Loading…
Cancel
Save