5df126
%if 0%{?fedora} > 12
5df126
%global with_python3 1
5df126
%else
5df126
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
5df126
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
5df126
%endif
5df126
5df126
%global srcname distribute
5df126
5df126
%define run_check 0%{!?_without_check:1}
5df126
##%define run_check 0%{!?_with_check:0}
5df126
5df126
Name:		Cython
5df126
Version:	0.19
5df126
##Release:	4.b3%{?dist}
b71f66
Release:	5%{?dist}
5df126
Summary:	A language for writing Python extension modules
5df126
5df126
%define upstreamversion %{version}
5df126
##%%define upstreamversion %{version}b3
5df126
5df126
Group:		Development/Tools
b71f66
License:    ASL 2.0
5df126
URL:		http://www.cython.org
5df126
Source:		http://www.cython.org/Cython-%{upstreamversion}.tar.gz
5df126
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5df126
5df126
BuildRequires:	python-devel python-setuptools
5df126
%if 0%{?with_python3}
5df126
BuildRequires:  python3-devel
5df126
%endif # if with_python3
5df126
5df126
%if 0%{run_check}
5df126
BuildRequires:	numpy libtool
5df126
%endif
5df126
Requires:	python
5df126
b71f66
Provides: python2-Cython = %{version}-%{release}
b71f66
5df126
%description
5df126
This is a development version of Pyrex, a language
5df126
for writing Python extension modules.
5df126
5df126
For more info, see:
5df126
5df126
    Doc/About.html for a description of the language
5df126
    INSTALL.txt	   for installation instructions
5df126
    USAGE.txt	   for usage instructions
5df126
    Demos	   for usage examples
5df126
5df126
%if 0%{?with_python3}
5df126
%package -n python3-Cython
5df126
Summary:	A language for writing Python extension modules
5df126
Group:		Development/Tools
5df126
5df126
%description -n python3-Cython
5df126
This is a development version of Pyrex, a language
5df126
for writing Python extension modules.
5df126
5df126
For more info, see:
5df126
5df126
    Doc/About.html for a description of the language
5df126
    INSTALL.txt	   for installation instructions
5df126
    USAGE.txt	   for usage instructions
5df126
    Demos	   for usage examples
5df126
%endif # with_python3
5df126
5df126
%prep
5df126
%setup -q -n %{name}-%{upstreamversion}
5df126
5df126
%if 0%{?with_python3}
5df126
rm -rf %{py3dir}
5df126
cp -a . %{py3dir}
5df126
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
5df126
%endif # with_python3
5df126
5df126
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
5df126
5df126
%build
5df126
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
5df126
5df126
%if 0%{?with_python3}
5df126
pushd %{py3dir}
5df126
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
5df126
popd
5df126
%endif # with_python3
5df126
5df126
5df126
%install
5df126
rm -rf $RPM_BUILD_ROOT
5df126
# Must do the python3 install first because the scripts in /usr/bin are
5df126
# overwritten with every setup.py install (and we want the python2 version
5df126
# to be the default for now).
5df126
%if 0%{?with_python3}
5df126
pushd %{py3dir}
5df126
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
5df126
mv $RPM_BUILD_ROOT/usr/bin/cython $RPM_BUILD_ROOT/usr/bin/cython3
5df126
mv $RPM_BUILD_ROOT/usr/bin/cygdb $RPM_BUILD_ROOT/usr/bin/cygdb3
5df126
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
5df126
popd
5df126
%endif
5df126
5df126
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
5df126
rm -rf ${buildroot}%{python_sitelib}/setuptools/tests
5df126
5df126
5df126
%clean
5df126
rm -rf $RPM_BUILD_ROOT
5df126
5df126
%if 0%{run_check}
5df126
%check
5df126
%{__python} runtests.py
5df126
5df126
%if 0%{?with_python3}
5df126
pushd %{py3dir}
5df126
%{__python3} setup.py test
5df126
popd
5df126
%endif # with_python3
5df126
%endif
5df126
5df126
%files
5df126
%defattr(-,root,root,-)
5df126
%{_bindir}/cython
5df126
%{_bindir}/cygdb
5df126
%{python_sitearch}/Cython
5df126
%{python_sitearch}/cython.py*
5df126
%{python_sitearch}/pyximport
5df126
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
5df126
%{python_sitearch}/Cython*egg-info
5df126
%endif
5df126
%if 0%{?with_python3}
5df126
%files -n python3-Cython
5df126
%doc *.txt Demos Doc Tools
5df126
%{python3_sitearch}/*
5df126
%{_bindir}/cython3
5df126
%{_bindir}/cygdb3
5df126
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
5df126
%{python3_sitearch}/Cython*egg-info
5df126
%endif
5df126
%endif # with_python3
5df126
%doc *.txt Demos Doc Tools
5df126
5df126
5df126
%changelog
b71f66
* Wed May 03 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.19-5
b71f66
- Change the license tag to Apache Software License 2.0
b71f66
Resolves: rhbz#1447673
b71f66
b71f66
* Wed Feb 01 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.19-4
b71f66
- Provide python2-Cython name
b71f66
Resolves: rhbz#1356680
b71f66
182c96
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.19-3
182c96
- Mass rebuild 2014-01-24
182c96
182c96
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.19-2
182c96
- Mass rebuild 2013-12-27
182c96
5df126
* Fri Apr 19 2013 nbecker <ndbecker2@gmail.com> - 0.19-1
5df126
- Update to 0.19
5df126
5df126
* Tue Jan 29 2013 Neal Becker <ndbecker2@gmail.com> - 0.18-1
5df126
- update to 0.18
5df126
5df126
* Sat Dec 15 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.3-1
5df126
- Update to 0.17.3
5df126
5df126
* Wed Nov 21 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.2-1
5df126
- update to 0.17.2
5df126
5df126
* Wed Sep 26 2012 Neal Becker <ndbecker2@gmail.com> - 0.17.1-1
5df126
- Update to 0.17.1
5df126
5df126
* Mon Sep  3 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-1
5df126
- Update to 0.17
5df126
5df126
* Tue Aug 28 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-3.b3
5df126
- Turn on check (temporarily)
5df126
- Add br numpy from check
5df126
5df126
* Tue Aug 28 2012 Neal Becker <ndbecker2@gmail.com> - 0.17-1.b3
5df126
- Test 0.17b3
5df126
5df126
* Fri Aug 24 2012 David Malcolm <dmalcolm@redhat.com> - 0.16-3
5df126
- generalize egg-info logic to support RHEL (rhbz#851528)
5df126
5df126
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
5df126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5df126
5df126
* Fri Apr 27 2012 Neal Becker <ndbecker2@gmail.com> - 0.16-1
5df126
- Update to 0.16
5df126
5df126
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.1-2
5df126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5df126
5df126
* Tue Sep 20 2011 Neal Becker <ndbecker2@gmail.com> - 0.15.1-1
5df126
- Update to 0.15.1
5df126
5df126
* Sat Aug  6 2011 Neal Becker <ndbecker2@gmail.com> - 0.15-1
5df126
- Update to 0.15
5df126
5df126
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.1-2
5df126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5df126
5df126
* Sat Feb  5 2011 Neal Becker <ndbecker2@gmail.com> - 0.14.1-1
5df126
- Update to 0.14.1
5df126
5df126
* Wed Dec 15 2010 Neal Becker <ndbecker2@gmail.com> - 0.14-2
5df126
- Add cygdb
5df126
5df126
* Wed Dec 15 2010 Neal Becker <ndbecker2@gmail.com> - 0.14-1
5df126
- Update to 0.14
5df126
5df126
* Wed Aug 25 2010 Neal Becker <ndbecker2@gmail.com> - 0.13-1
5df126
- Update to 0.13
5df126
5df126
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.12.1-5
5df126
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
5df126
5df126
* Fri Feb  5 2010 Neal Becker <ndbecker2@gmail.com> - 0.12.1-4
5df126
- Disable check for now as it fails on PPC
5df126
5df126
* Tue Feb  2 2010 Neal Becker <ndbecker2@gmail.com> - 0.12.1-2
5df126
- typo
5df126
- stupid rpm comments
5df126
5df126
* Mon Nov 23 2009 Neal Becker <ndbecker2@gmail.com> - 0.12-1.rc1
5df126
- Make that 0.12
5df126
5df126
* Mon Nov 23 2009 Neal Becker <ndbecker2@gmail.com> - 0.12.1-1.rc1
5df126
- Update to 0.12.1
5df126
5df126
* Sun Sep 27 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.3-1.rc1
5df126
- Update to 0.11.3rc1
5df126
- Update to 0.11.3
5df126
5df126
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-2
5df126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5df126
5df126
* Wed May 20 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.2-1
5df126
- Update to 0.11.2
5df126
5df126
* Thu Apr 16 2009 Neal Becker <ndbecker2@gmail.com> - 0.11.1-1
5df126
- Update to 0.11.1
5df126
5df126
* Sat Mar 14 2009 Neal Becker <ndbecker2@gmail.com> - 0.11-2
5df126
- Missed cython.py*
5df126
5df126
* Sat Mar 14 2009 Neal Becker <ndbecker2@gmail.com> - 0.11-1
5df126
- Update to 0.11
5df126
- Exclude numpy from tests so we don't have to BR it
5df126
5df126
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.3-2
5df126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5df126
5df126
* Wed Dec 17 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.3-1
5df126
- Update to 0.10.3
5df126
5df126
* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.2-2
5df126
- Rebuild for Python 2.6
5df126
5df126
* Mon Dec  1 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.2-1
5df126
- Update to 0.10.2
5df126
5df126
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.1-2
5df126
- Rebuild for Python 2.6
5df126
5df126
* Wed Nov 19 2008 Neal Becker <ndbecker2@gmail.com> - 0.10.1-1
5df126
- Update to 0.10.1
5df126
5df126
* Sun Nov  9 2008 Neal Becker <ndbecker2@gmail.com> - 0.10-3
5df126
- Fix typo
5df126
5df126
* Sun Nov  9 2008 Neal Becker <ndbecker2@gmail.com> - 0.10-1
5df126
- Update to 0.10
5df126
5df126
* Fri Jun 13 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.8-2
5df126
- Install into python_sitearch
5df126
- Add %%check
5df126
5df126
* Fri Jun 13 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.8-1
5df126
- Update to 0.9.8
5df126
5df126
* Mon Apr 14 2008 José Matos <jamatos[AT]fc.up.pt> - 0.9.6.13.1-3
5df126
- Remove remaining --record.
5df126
- Add more documentation (Doc and Tools).
5df126
- Add correct entry for egg-info (F9+).
5df126
5df126
* Mon Apr 14 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13.1-2
5df126
- Change License to Python
5df126
- Install About.html
5df126
- Fix mixed spaces/tabs
5df126
- Don't use --record
5df126
5df126
* Tue Apr  8 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13.1-1
5df126
- Update to 0.9.6.13.1
5df126
5df126
* Mon Apr  7 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.13-1
5df126
- Update to 0.9.6.13
5df126
- Add docs
5df126
5df126
* Tue Feb 26 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.12-1
5df126
- Initial version
5df126