diff --git a/sip.spec b/sip.spec index 9c1e7e6..3bb0bd1 100644 --- a/sip.spec +++ b/sip.spec @@ -1,33 +1,23 @@ -%{expand: %%define pythonver %(python -c 'import sys;print(sys.version[0:3])')} -%define pythonsitedir %{_libdir}/python%{pythonver}/site-packages -%define pythonpkg python +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define minor .2 %define qtver 3.3.6 %define qtpkg qt -%if "%{pythonver}" == "2.4" -%define pythonprog /usr/bin/python2.4 -%else -%define pythonprog /usr/bin/python -%endif - Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.5 -Release: 1 +Release: 2 License: GPL Group: Development/Tools Url: http://www.riverbankcomputing.co.uk/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source: http://www.riverbankcomputing.co.uk/download/sip/%{name}-%{version}.tar.gz -BuildRequires: %{pythonpkg}-devel >= %{pythonver} +BuildRequires: python-devel BuildRequires: %{qtpkg}-devel >= %{qtver} BuildRequires: sed -Requires: %{pythonpkg} >= %{pythonver} - %description SIP is a tool for generating bindings for C++ classes so that they can be accessed as normal Python classes. SIP takes many of its ideas from SWIG but, @@ -63,7 +53,7 @@ for target in default linux-g++ linux-g++-32 linux-g++-64 ; do fi done -%pythonprog configure.py -d %{pythonsitedir} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" +python configure.py -d %{python_sitearch} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" make %{?_smp_mflags} @@ -83,15 +73,19 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %doc ChangeLog LICENSE NEWS README THANKS -%{pythonsitedir}/* +%{python_sitearch}/* %{_bindir}/* %files devel %defattr(-,root,root) %{_datadir}/sip -%{_includedir}/python%{pythonver}/* +%{_includedir}/python?.?/* %changelog +* Thu Dec 7 2006 Jeremy Katz - 4.5-2 +- rebuild against python 2.5 +- cleanups for python packaging guidelines + * Mon Nov 06 2006 Than Ngo 4.5-1 - 4.5