%define python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python64_sitearch %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") Name: Cython Version: 0.15.1 Release: 1 Summary: A language for writing Python extension modules Group: Development/Tools License: Python URL: http://www.cython.org Source0: http://www.cython.org/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.6.2 BuildRequires: python-setuptools >= 0.6.14 Requires: python >= 2.6.2 %description This is a development version of Pyrex, a language for writing Python extension modules. For more info, see: Doc/About.html for a description of the language INSTALL.txt for installation instructions USAGE.txt for usage instructions Demos for usage examples %prep %setup -q -n %{name}-%{version} mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build cd 64bit # first build the 64-bit version export OBJECT_MODE=64 python_64 setup.py build cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 python setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit python_64 setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit python setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/*.txt 32bit/Demos 32bit/Doc 32bit/Tools %{_bindir}/* %{python_sitearch}/Cython %{python64_sitearch}/Cython %{python_sitearch}/Cython*egg-info %{python64_sitearch}/Cython*egg-info %{python_sitearch}/cython.py* %{python64_sitearch}/cython.py* %{python_sitearch}/pyximport %{python64_sitearch}/pyximport /usr/bin/* %changelog * Fri Nov 18 2011 Michael Perzl - 0.15.1-1 - first version for AIX V5.1 and higher