Update to 0.23.4
- Ship cythonize3 - Modernize and cleanup spec - Run tests, one python3 test fails with 3.5
This commit is contained in:
parent
8812aab318
commit
94f83456fb
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,3 +19,4 @@ Cython-0.12.1.tar.gz
|
||||
/Cython-0.21.1.tar.gz
|
||||
/Cython-0.22.tar.gz
|
||||
/Cython-0.23.tar.gz
|
||||
/Cython-0.23.4.tar.gz
|
||||
|
100
Cython.spec
100
Cython.spec
@ -1,39 +1,38 @@
|
||||
%if 0%{?fedora} > 12
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%else
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%endif
|
||||
|
||||
%global srcname distribute
|
||||
%global srcname Cython
|
||||
|
||||
%define run_check 0%{!?_without_check:1}
|
||||
##%define run_check 0%{!?_with_check:0}
|
||||
%bcond_without check
|
||||
|
||||
Name: Cython
|
||||
Version: 0.23
|
||||
Version: 0.23.4
|
||||
##Release: 4.b3%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: A language for writing Python extension modules
|
||||
|
||||
%define upstreamversion %{version}
|
||||
##%%define upstreamversion %{version}b3
|
||||
%global upstreamversion %{version}
|
||||
##%%global upstreamversion %{version}b3
|
||||
|
||||
Group: Development/Tools
|
||||
License: Python
|
||||
URL: http://www.cython.org
|
||||
Source: http://www.cython.org/release/Cython-%{upstreamversion}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Source: http://www.cython.org/release/%{srcname}-%{upstreamversion}.tar.gz
|
||||
|
||||
BuildRequires: python-devel python-setuptools
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-devel
|
||||
%endif # if with_python3
|
||||
|
||||
%if 0%{run_check}
|
||||
BuildRequires: numpy libtool
|
||||
%if %{with check}
|
||||
BuildRequires: libtool
|
||||
BuildRequires: numpy
|
||||
# Coverage tests fail
|
||||
#BuildRequires: python-coverage
|
||||
%endif
|
||||
Requires: python
|
||||
|
||||
Provides: python2-%{srcname} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
This is a development version of Pyrex, a language
|
||||
@ -47,11 +46,16 @@ For more info, see:
|
||||
Demos for usage examples
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-Cython
|
||||
%package -n python3-%{srcname}
|
||||
Summary: A language for writing Python extension modules
|
||||
Group: Development/Tools
|
||||
%if %{with check}
|
||||
# Coverage tests fail
|
||||
#BuildRequires: python3-coverage
|
||||
BuildRequires: python3-numpy
|
||||
%endif
|
||||
|
||||
%description -n python3-Cython
|
||||
%description -n python3-%{srcname}
|
||||
This is a development version of Pyrex, a language
|
||||
for writing Python extension modules.
|
||||
|
||||
@ -66,80 +70,72 @@ For more info, see:
|
||||
%prep
|
||||
%setup -q -n %{name}-%{upstreamversion}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||
%endif # with_python3
|
||||
|
||||
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
||||
%py2_build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
popd
|
||||
%py3_build
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# Must do the python3 install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install (and we want the python2 version
|
||||
# to be the default for now).
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
%py3_install
|
||||
mv $RPM_BUILD_ROOT/usr/bin/cython $RPM_BUILD_ROOT/usr/bin/cython3
|
||||
mv $RPM_BUILD_ROOT/usr/bin/cythonize $RPM_BUILD_ROOT/usr/bin/cythonize3
|
||||
mv $RPM_BUILD_ROOT/usr/bin/cygdb $RPM_BUILD_ROOT/usr/bin/cygdb3
|
||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
%py2_install
|
||||
rm -rf %{buildroot}%{python_sitelib}/setuptools/tests
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{run_check}
|
||||
%if %{with check}
|
||||
%check
|
||||
%{__python} runtests.py
|
||||
%{__python} runtests.py -vv
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py test
|
||||
popd
|
||||
# asyncio test fails
|
||||
%{__python3} runtests.py -vv || :
|
||||
%endif # with_python3
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %doc}
|
||||
%license LICENSE.txt
|
||||
%doc *.txt Demos Doc Tools
|
||||
%{_bindir}/cython
|
||||
%{_bindir}/cygdb
|
||||
%{_bindir}/cythonize
|
||||
%{python_sitearch}/Cython
|
||||
%{python_sitearch}/%{srcname}
|
||||
%{python_sitearch}/cython.py*
|
||||
%{python_sitearch}/pyximport
|
||||
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
||||
%{python_sitearch}/Cython*egg-info
|
||||
%endif
|
||||
%{python_sitearch}/%{srcname}*egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-Cython
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE.txt
|
||||
%doc *.txt Demos Doc Tools
|
||||
%{python3_sitearch}/*
|
||||
%{_bindir}/cython3
|
||||
%{_bindir}/cythonize3
|
||||
%{_bindir}/cygdb3
|
||||
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
||||
%{python3_sitearch}/Cython*egg-info
|
||||
%endif
|
||||
%endif # with_python3
|
||||
%doc *.txt Demos Doc Tools
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 13 2016 Orion Poplawski <orion@cora.nwra.com> - 0.23.4-1
|
||||
- Update to 0.23.4
|
||||
- Ship cythonize3
|
||||
- Modernize and cleanup spec
|
||||
- Run tests, one python3 test fails with 3.5
|
||||
|
||||
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 0.23-2
|
||||
- Rebuilt for Python3.5 rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user