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