diff --git a/.cvsignore b/.cvsignore index 71e948d..c15dd64 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -sip-4.9.3.tar.gz +sip-4.10.tar.gz diff --git a/macros.sip b/macros.sip index 557a809..c6aba1f 100644 --- a/macros.sip +++ b/macros.sip @@ -1,3 +1,3 @@ -%_sip_api_major 6 +%_sip_api_major 7 %_sip_api_minor 0 %_sip_api %{_sip_api_major}.%{_sip_api_minor} diff --git a/sip.spec b/sip.spec index e64477b..94bd6e4 100644 --- a/sip.spec +++ b/sip.spec @@ -1,10 +1,17 @@ +%global with_python3 0 + +%if 0%{?with_python3} +%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")} +%global python3dir python3-%{name}-%{version}%{?snap:-snapshot-%{snap}} +%endif + %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?python_inc:%global python_inc %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")} Summary: SIP - Python/C++ Bindings Generator Name: sip -Version: 4.9.3 +Version: 4.10 Release: 1%{?dist} License: GPLv2 or GPLv3 Group: Development/Tools @@ -14,7 +21,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines Source1: macros.sip -%global _sip_api_major 6 +%global _sip_api_major 7 %global _sip_api_minor 0 %global _sip_api %{_sip_api_major}.%{_sip_api_minor} @@ -23,6 +30,10 @@ Provides: sip-api(%{_sip_api_major}) = %{_sip_api} BuildRequires: python-devel BuildRequires: sed +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif + %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, @@ -44,17 +55,63 @@ Requires: rpm This package contains files needed to generate Python bindings for any C++ classes library. +%if 0%{?with_python3} +%package -n python3-sip +Summary: SIP - Python 3/C++ Bindings Generator +Group: Development/Tools +Provides: python3-sip-api(%{_sip_api_major}) = %{_sip_api} + +%description -n python3-sip +This is the Python 3 build of SIP. + +SIP is a tool for generating bindings for C++ classes so that they can be +accessed as normal Python 3 classes. SIP takes many of its ideas from SWIG but, +because it is specifically designed for C++ and Python, is able to generate +tighter bindings. SIP is so called because it is a small SWIG. + +SIP was originally designed to generate Python bindings for KDE and so has +explicit support for the signal slot mechanism used by the Qt/KDE class +libraries. However, SIP can be used to generate Python 3 bindings for any C++ +class library. + +%package -n python3-sip-devel +Summary: Files needed to generate Python 3 bindings for any C++ class library +Group: Development/Libraries +Requires: python3-sip = %{version}-%{release} +Requires: python3-devel +Requires: rpm + +%description -n python3-sip-devel +This package contains files needed to generate Python 3 bindings for any C++ +classes library. +%endif + %prep %setup -q -n %{name}-%{version}%{?snap:-snapshot-%{snap}} +%if 0%{?with_python3} +#FIXME: rdieter says: reuse the %setup macro - but this is a simple case, without lots of patch application etc +pushd .. +cp -a %{name}-%{version}%{?snap:-snapshot-%{snap}} %{python3dir} +popd +%endif + %build %{__python} configure.py -d %{python_sitearch} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" make %{?_smp_mflags} +%if 0%{?with_python3} +pushd ../%{python3dir} +%{__python3} configure.py -d %{python3_sitearch} CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" --sipdir=%{_datadir}/python3-sip + +make %{?_smp_mflags} +popd +%endif + %install rm -rf %{buildroot} @@ -64,6 +121,14 @@ mkdir -p %{buildroot}%{_datadir}/sip install -D -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.sip +%if 0%{?with_python3} +pushd ../%{python3dir} +#FIXME: this is going to stomp over /usr/bin/sip from the python2 build above: +make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_datadir}/python3-sip +popd +%endif + %clean rm -rf %{buildroot} @@ -82,8 +147,29 @@ rm -rf %{buildroot} %{python_inc}/* %{_sysconfdir}/rpm/macros.sip +%if 0%{?with_python3} +%files -n python3-sip +%{python3_sitearch}/* + +%files -n python3-sip-devel +# FIXME: what should the python3 sip binary be named? It gets invoked by name in various places higher up in the KDE-Python stack... +%{_bindir}/sip-3 +%{_datadir}/python-3sip/ +%{python3_inc}/* +%endif + %changelog +* Fri Jan 15 2010 Rex Dieter - 4.10-1 +- sip-4.10 (final) + +* Fri Jan 08 2010 Rex Dieter - 4.10-0.2.20100102 +- RFE: Support python3 when building sip (#545124) +- drop old pre v4 changelog + +* Thu Jan 07 2010 Rex Dieter - 4.10-0.1.20100102 +- sip-4.10-snapshot-20100102 + * Mon Nov 23 2009 Rex Dieter - 4.9.3-1 - sip-4.9.3 @@ -214,7 +300,6 @@ rm -rf %{buildroot} - update to 4.4.3 - built with %%{optflags} - * Fri Feb 10 2006 Jesse Keating - 4.3.1-1.2.1 - bump again for double-long bug on ppc(64) @@ -238,202 +323,3 @@ rm -rf %{buildroot} * Fri Sep 24 2004 Than Ngo 4.1-1 - update to 4.1 - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Thu May 27 2004 Than Ngo 3.10.2-1 -- update to 3.10.2 - -* Fri Mar 12 2004 Than Ngo 3.10.1-1 -- update to 3.10.1 - -* Tue Mar 02 2004 Elliot Lee -- rebuilt - -* Thu Feb 19 2004 Than Ngo 3.10-6 -- fix Requires issue, bug #74004 - -* Thu Feb 19 2004 Than Ngo 3.10-5 -- fix lib64 issue - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Thu Feb 12 2004 Than Ngo 3.10-3 -- use new method of building SIP - -* Wed Feb 11 2004 Than Ngo 3.10-2 -- rebuilt against qt 3.3.0 - -* Wed Feb 04 2004 Than Ngo 3.10-1 -- 3.10 - -* Thu Nov 27 2003 Than Ngo 3.8-2 -- rebuild against python 2.3 and Qt 3.2.3 - -* Fri Sep 26 2003 Harald Hoyer 3.8-1 -- 3.8 - -* Mon Jul 21 2003 Than Ngo 3.7-1 -- 3.7 - -* Tue Jun 24 2003 Than Ngo 3.6-3 -- rebuilt - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Tue May 6 2003 Than Ngo 3.6-1.1 -- 3.6 - -* Tue Mar 4 2003 Than Ngo 3.5.1-0.20030301.0 -- snapshot 20030301, support qt 3.1.2 - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Tue Dec 11 2002 Than Ngo 3.5-1 -- 3.5 release - -* Mon Nov 18 2002 Than Ngo 3.5-0.20021114.1 -- update RC, which supports qt 3.1.0 -- fix dependency problem with python - -* Thu Nov 7 2002 Than Ngo 3.4-4 -- update to 3.4 - -* Wed Aug 28 2002 Than Ngo 3.3.2-4 -- rpath issue - -* Mon Aug 26 2002 Than Ngo 3.3.2-3 -- rebuild against new qt - -* Sat Aug 10 2002 Elliot Lee -- rebuilt with gcc-3.2 (we hope) - -* Tue Jul 23 2002 Than Ngo 3.3.2-1 -- 3.3.2 release for qt 3.0.5 - -* Mon Jul 1 2002 Than Ngo 3.2.4-4 -- move python modul libsip.so into sip (bug #67640) - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Sun May 26 2002 Tim Powers -- automated rebuild - -* Wed May 22 2002 Harald Hoyer -- updated to release 3.2.4 - -* Thu May 02 2002 Than Ngo 3.2-0.rc4 -- 3.2rc4 -- build against python 2 - -* Tue Apr 16 2002 Than Ngo 3.1-2 -- rebuild - -* Fri Mar 29 2002 Than Ngo 3.1-1 -- update 3.1 for qt 3.0.3 - -* Tue Mar 07 2002 Than Ngo 3.0-6 -- rebuild against qt3 - -* Fri Feb 22 2002 Than Ngo 3.0-5 -- build against python 1.5 and qt 2.3.2 - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Tue Jan 08 2002 Than Ngo 3.0-3 -- rebuild to get rid of libGL - -* Mon Nov 19 2001 Than Ngo 3.0-2 -- build against qt3 - -* Sun Nov 18 2001 Than Ngo 3.0-1 -- update to 3.0 - -* Sun Nov 11 2001 Than Ngo 3.0-0.20011110.1 -- snapshot - -* Tue Aug 14 2001 Than Ngo 2.5-1 -- update to 2.5 -- requires python 2 -- Updated URL - -* Mon Jul 23 2001 Than Ngo -- fix build dependency (bug #49698) - -* Mon Jul 16 2001 Trond Eivind Glomsrød -- s/Copyright/License/ -- Make devel subpackage depend on main - -* Mon Apr 23 2001 Than Ngo -- update to 2.4 - -* Wed Feb 28 2001 Tim Powers -- rebuilt against new libmng - -* Fri Feb 23 2001 Than Ngo -- fix to use python1.5 - -* Thu Feb 22 2001 Than Ngo -- update to 2.3 release - -* Fri Feb 02 2001 Than Ngo -- rebuild in new envoroment - -* Tue Dec 26 2000 Than Ngo -- rebuilt against qt-2.2.3 -- update Url - -* Mon Nov 20 2000 Tim Powers -- rebuilt to fix bad dir perms - -* Wed Nov 8 2000 Than Ngo -- update to 2.2 -- don't apply the patch, since the gcc-2.96-62 works correct - -* Mon Oct 23 2000 Than Ngo -- update to 2.1 - -* Thu Aug 3 2000 Than Ngo -- add ldconfig in %post, %postun and Prereq (Bug #15136) - -* Thu Jul 27 2000 Than Ngo -- don't hardcode Qt version - -* Mon Jul 25 2000 Prospector -- rebuilt - -* Mon Jul 17 2000 Tim Powers -- added defattr to both packages - -* Wed Jul 12 2000 Than Ngo -- fix to built withe gcc-2.96 - -* Mon Jul 03 2000 Prospector -- automatic rebuild - -* Sat May 27 2000 Ngo Than -- update 0.12 for 7.0 - -* Mon May 8 2000 Bernhard Rosenkraenzer -- 0.11.1 -- Qt 2.1.0 - -* Wed Feb 2 2000 Bernhard Rosenkraenzer -- 0.10.1 -- Qt 1.45 -- handle RPM_OPT_FLAGS - -* Tue Dec 21 1999 Ngo Than -- updated 0.10 - -* Tue Dec 14 1999 Ngo Than -- 0.10pre5 - -* Sun Nov 28 1999 Ngo Than -- Initial packaging as RPM for powertools-6.2 diff --git a/sources b/sources index 593e159..2b18505 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d60ec6e87c0155df779fd8b529e80706 sip-4.9.3.tar.gz +4b8f7361839b33868dd3cc576509ba8e sip-4.10.tar.gz