New upstream release. Drop python2 subpackages (bz 1663842).
This commit is contained in:
parent
54251165d0
commit
585c6ac63d
|
@ -4,7 +4,7 @@
|
|||
%global _python_bytecompile_extra 0
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 1.7.2
|
||||
Version: 1.8.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Interrupt and signal handling for Cython
|
||||
License: LGPLv3+
|
||||
|
@ -37,116 +37,66 @@ See http://cysignals.readthedocs.org/ for the full documentation.
|
|||
|
||||
%description %{_description}
|
||||
|
||||
%package -n python2-%{modname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python2-%{modname}}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-Cython
|
||||
BuildRequires: python2-setuptools
|
||||
Requires: python2-Cython
|
||||
%description -n python2-%{modname} %{_description}
|
||||
|
||||
%package -n python2-%{modname}-devel
|
||||
Summary: %{summary} headers files
|
||||
%{?python_provide:%python_provide python2-%{modname}-devel}
|
||||
Requires: python2-%{modname}
|
||||
%description -n python2-%{modname}-devel %{_description}
|
||||
|
||||
%package -n python3-%{modname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3dist(cython)
|
||||
BuildRequires: python3dist(setuptools)
|
||||
Requires: python3-Cython
|
||||
|
||||
# This can be removed when F29 reaches EOL
|
||||
Obsoletes: python2-%{modname} < 1.8.1-1
|
||||
Provides: python2-%{modname} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{modname} %{_description}
|
||||
|
||||
%package -n python3-%{modname}-devel
|
||||
Summary: %{summary} headers files
|
||||
%{?python_provide:%python_provide python3-%{modname}-devel}
|
||||
Requires: python3-%{modname}
|
||||
|
||||
# This can be removed when F29 reaches EOL
|
||||
Obsoletes: python2-%{modname}-devel < 1.8.1-1
|
||||
Provides: python2-%{modname}-devel = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{modname}-devel %{_description}
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
BuildRequires: python2-sphinx
|
||||
Requires: python2-%{modname}
|
||||
BuildRequires: python3dist(sphinx)
|
||||
Requires: python3-%{modname}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation and examples for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%autosetup -p0 -n %{modname}-%{version}
|
||||
|
||||
%build
|
||||
%configure
|
||||
sed -i 's/"cysignals-CSI"/"cysignals-CSI-2"/' src/cysignals/implementation.c
|
||||
%py2_build
|
||||
sed -i 's/"cysignals-CSI-2"/"cysignals-CSI-3"/' src/cysignals/implementation.c
|
||||
%py3_build
|
||||
|
||||
# Build the documentation
|
||||
export PYTHONPATH=$PWD/$(ls -1d build/lib.linux*%{python2_version})
|
||||
%__make -C docs html
|
||||
export PYTHONPATH=$PWD/$(ls -1d build/lib.linux*%{python3_version})
|
||||
%__make -C docs html SPHINXBUILD=sphinx-build-3
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp -farp docs/build/html %{buildroot}%{_docdir}/%{name}
|
||||
rm %{buildroot}%{_docdir}/%{name}/html/.buildinfo
|
||||
|
||||
cp -p %{buildroot}%{_bindir}/cysignals-CSI{,-3}
|
||||
sed -i 's@^\(#!/usr/bin/python\)3\( -s\)@\12\2@' %{buildroot}%{_bindir}/cysignals-CSI
|
||||
mv %{buildroot}%{_bindir}/cysignals-CSI{,-2}
|
||||
|
||||
%check
|
||||
for check in src/cysignals/*.pyx; do
|
||||
sed -i -e "s/Popen(\['python'/Popen(\['python2'/" $check
|
||||
done
|
||||
PATH=%{buildroot}%{_bindir}:$PATH
|
||||
PYTHONPATH=%{buildroot}%{python2_sitearch}
|
||||
export PATH PYTHONPATH
|
||||
%{__python2} rundoctests.py src/cysignals/*.pyx
|
||||
# FIXME - not interrupting the timer - not fully functional for python3?
|
||||
#File "src/cysignals/pselect.pyx", line 243, in pselect.pyx
|
||||
#Failed example:
|
||||
# (0.2 <= t <= 0.9) or t
|
||||
#Expected:
|
||||
# True
|
||||
#Got:
|
||||
# 1.004807949066162
|
||||
for check in src/cysignals/*.pyx; do
|
||||
sed -i -e "s/Popen(\['python2'/Popen(\['python3'/" $check
|
||||
done
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
export PYTHONPATH
|
||||
%{__python3} rundoctests.py src/cysignals/*.pyx || :
|
||||
|
||||
%files -n python2-%{modname}
|
||||
%license LICENSE
|
||||
%doc PKG-INFO README.rst
|
||||
%{_bindir}/%{modname}-CSI-2
|
||||
%{_datadir}/%{modname}/
|
||||
%{python2_sitearch}/%{modname}
|
||||
%{python2_sitearch}/%{modname}-*.egg-info
|
||||
%exclude %{python2_sitearch}/%{modname}/*.h
|
||||
%exclude %{python2_sitearch}/%{modname}/*.pxd
|
||||
%exclude %{python2_sitearch}/%{modname}/*.pxi
|
||||
|
||||
%files -n python2-%{modname}-devel
|
||||
%{python2_sitearch}/%{modname}/*.h
|
||||
%{python2_sitearch}/%{modname}/*.pxd
|
||||
%{python2_sitearch}/%{modname}/*.pxi
|
||||
export PATH PYTHONPATH
|
||||
%{__python3} rundoctests.py src/cysignals/*.pyx
|
||||
|
||||
%files -n python3-%{modname}
|
||||
%license LICENSE
|
||||
%doc PKG-INFO README.rst
|
||||
%{_bindir}/%{modname}-CSI-3
|
||||
%{_bindir}/%{modname}-CSI
|
||||
%{_datadir}/%{modname}/
|
||||
%{python3_sitearch}/%{modname}
|
||||
%{python3_sitearch}/%{modname}-*.egg-info
|
||||
|
@ -164,6 +114,10 @@ export PYTHONPATH
|
|||
%{_docdir}/%{name}/html
|
||||
|
||||
%changelog
|
||||
* Thu Jan 17 2019 Jerry James <loganjerry@gmail.com> - 1.8.1-1
|
||||
- New upstream release
|
||||
- Drop python2 subpackages (bz 1663842)
|
||||
|
||||
* Fri Aug 10 2018 Jerry James <loganjerry@gmail.com> - 1.7.2-1
|
||||
- New upstream release (bz 1601237)
|
||||
- Drop upstreamed -import patch
|
||||
|
|
Loading…
Reference in New Issue