Blame SPECS/Cython.spec

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