rpms/sip/devel sip.spec,1.72,1.73

Rex Dieter rdieter at fedoraproject.org
Fri Jan 8 16:04:58 UTC 2010


Author: rdieter

Update of /cvs/pkgs/rpms/sip/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv897

Modified Files:
	sip.spec 
Log Message:
* Fri Jan 08 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.10-0.2.20100102
- RFE: Support python3 when building sip (#545124)
- drop old pre v4 changelog



Index: sip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sip/devel/sip.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- sip.spec	7 Jan 2010 21:38:04 -0000	1.72
+++ sip.spec	8 Jan 2010 16:04:58 -0000	1.73
@@ -1,4 +1,11 @@
 
+%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)")}
 
@@ -7,7 +14,7 @@
 Summary: SIP - Python/C++ Bindings Generator
 Name: sip
 Version: 4.10
-Release: 0.1.%{snap}%{?dist}
+Release: 0.2.%{snap}%{?dist}
 License: GPLv2 or GPLv3
 Group: Development/Tools
 Url: http://www.riverbankcomputing.com/software/sip/intro 
@@ -25,6 +32,10 @@ Provides: sip-api(%{_sip_api_major}) = %
 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,
@@ -46,17 +57,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}
@@ -66,6 +123,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}
@@ -84,9 +149,24 @@ 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
-* Thu Jan 07 2010 Rex Dieter <rdieter at fedoraproject.org. - 4.10-0.1.20100102
+* Fri Jan 08 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.10-0.2.20100102
+- RFE: Support python3 when building sip (#545124)
+- drop old pre v4 changelog
+
+* Thu Jan 07 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.10-0.1.20100102
 - sip-4.10-snapshot-20100102
 
 * Mon Nov 23 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.9.3-1
@@ -219,7 +299,6 @@ rm -rf %{buildroot}
 - update to 4.4.3
 - built with %%{optflags}
 
-
 * Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 4.3.1-1.2.1
 - bump again for double-long bug on ppc(64)
 
@@ -243,202 +322,3 @@ rm -rf %{buildroot}
 
 * Fri Sep 24 2004 Than Ngo <than at redhat.com> 4.1-1
 - update to 4.1
-
-* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
-- rebuilt
-
-* Thu May 27 2004 Than Ngo <than at redhat.com> 3.10.2-1
-- update to 3.10.2
-
-* Fri Mar 12 2004 Than Ngo <than at redhat.com> 3.10.1-1
-- update to 3.10.1
-
-* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
-- rebuilt
-
-* Thu Feb 19 2004 Than Ngo <than at redhat.com> 3.10-6 
-- fix Requires issue, bug #74004
-
-* Thu Feb 19 2004 Than Ngo <than at redhat.com> 3.10-5
-- fix lib64 issue
-
-* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
-- rebuilt
-
-* Thu Feb 12 2004 Than Ngo <than at redhat.com> 3.10-3
-- use new method of building SIP
-
-* Wed Feb 11 2004 Than Ngo <than at redhat.com> 3.10-2
-- rebuilt against qt 3.3.0
-
-* Wed Feb 04 2004 Than Ngo <than at redhat.com> 3.10-1
-- 3.10
-
-* Thu Nov 27 2003 Than Ngo <than at redhat.com> 3.8-2
-- rebuild against python 2.3 and Qt 3.2.3
-
-* Fri Sep 26 2003 Harald Hoyer <harald at redhat.de> 3.8-1
-- 3.8
-
-* Mon Jul 21 2003 Than Ngo <than at redhat.com> 3.7-1
-- 3.7
-
-* Tue Jun 24 2003 Than Ngo <than at redhat.com> 3.6-3
-- rebuilt
-
-* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
-- rebuilt
-
-* Tue May  6 2003 Than Ngo <than at redhat.com> 3.6-1.1
-- 3.6
-
-* Tue Mar  4 2003 Than Ngo <than at redhat.com> 3.5.1-0.20030301.0
-- snapshot 20030301, support qt 3.1.2
-
-* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
-- rebuilt
-
-* Tue Dec 11 2002 Than Ngo <than at redhat.com> 3.5-1
-- 3.5 release
-
-* Mon Nov 18 2002 Than Ngo <than at redhat.com> 3.5-0.20021114.1
-- update RC, which supports qt 3.1.0
-- fix dependency problem with python
-
-* Thu Nov  7 2002 Than Ngo <than at redhat.com> 3.4-4
-- update to 3.4
-
-* Wed Aug 28 2002 Than Ngo <than at redhat.com> 3.3.2-4
-- rpath issue
-
-* Mon Aug 26 2002 Than Ngo <than at redhat.com> 3.3.2-3
-- rebuild against new qt
-
-* Sat Aug 10 2002 Elliot Lee <sopwith at redhat.com>
-- rebuilt with gcc-3.2 (we hope)
-
-* Tue Jul 23 2002 Than Ngo <than at redhat.com> 3.3.2-1
-- 3.3.2 release for qt 3.0.5
-
-* Mon Jul  1 2002 Than Ngo <than at redhat.com> 3.2.4-4
-- move python modul libsip.so into sip (bug #67640)
-
-* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
-- automated rebuild
-
-* Sun May 26 2002 Tim Powers <timp at redhat.com>
-- automated rebuild
-
-* Wed May 22 2002 Harald Hoyer <harald at redhat.de>
-- updated to release 3.2.4
-
-* Thu May 02 2002 Than Ngo <than at redhat.com> 3.2-0.rc4
-- 3.2rc4
-- build against python 2
-
-* Tue Apr 16 2002 Than Ngo <than at redhat.com> 3.1-2
-- rebuild
-
-* Fri Mar 29 2002 Than  Ngo <than at redhat.com> 3.1-1
-- update 3.1 for qt 3.0.3
-
-* Tue Mar  07 2002 Than Ngo <than at redhat.com> 3.0-6
-- rebuild against qt3
-
-* Fri Feb 22 2002 Than Ngo <than at redhat.com> 3.0-5
-- build against python 1.5 and qt 2.3.2
-
-* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
-- automated rebuild
-
-* Tue Jan 08 2002 Than Ngo <than at redhat.com> 3.0-3
-- rebuild to get rid of libGL
-
-* Mon Nov 19 2001 Than Ngo <than at redhat.com> 3.0-2
-- build against qt3
-
-* Sun Nov 18 2001 Than Ngo <than at redhat.com> 3.0-1
-- update to 3.0
-
-* Sun Nov 11 2001 Than Ngo <than at redhat.com> 3.0-0.20011110.1
-- snapshot
-
-* Tue Aug 14 2001 Than Ngo <than at redhat.com> 2.5-1
-- update to 2.5
-- requires python 2
-- Updated URL
-
-* Mon Jul 23 2001 Than Ngo <than at redhat.com>
-- fix build dependency (bug #49698)
-
-* Mon Jul 16 2001 Trond Eivind Glomsrød <teg at redhat.com>
-- s/Copyright/License/
-- Make devel subpackage depend on main
-
-* Mon Apr 23 2001 Than Ngo <than at redhat.com>
-- update to 2.4
-
-* Wed Feb 28 2001 Tim Powers <timp at redhat.com>
-- rebuilt against new libmng
-
-* Fri Feb 23 2001 Than Ngo <than at redhat.com>
-- fix to use python1.5
-
-* Thu Feb 22 2001 Than Ngo <than at redhat.com>
-- update to 2.3 release
-
-* Fri Feb 02 2001 Than Ngo <than at redhat.com>
-- rebuild in new envoroment
-
-* Tue Dec 26 2000 Than Ngo <than at redhat.com>
-- rebuilt against qt-2.2.3
-- update Url
-
-* Mon Nov 20 2000 Tim Powers <timp at redhat.com>
-- rebuilt to fix bad dir perms
-
-* Wed Nov 8 2000 Than Ngo <than at redhat.com>
-- update to 2.2
-- don't apply the patch, since the gcc-2.96-62 works correct
-
-* Mon Oct 23 2000 Than Ngo <than at redhat.com>
-- update to 2.1
-
-* Thu Aug 3 2000 Than Ngo <than at redhat.de>
-- add ldconfig in %post, %postun and Prereq (Bug #15136)
-
-* Thu Jul 27 2000 Than Ngo <than at redhat.de>
-- don't hardcode Qt version
-
-* Mon Jul 25 2000 Prospector <prospector at redhat.com>
-- rebuilt
-
-* Mon Jul 17 2000 Tim Powers <timp at redhat.com>
-- added defattr to both packages
-
-* Wed Jul 12 2000 Than Ngo <than at redhat.de>
-- fix to built withe gcc-2.96
-
-* Mon Jul 03 2000 Prospector <bugzilla at redhat.com>
-- automatic rebuild
-
-* Sat May 27 2000 Ngo Than <than at redhat.de>
-- update 0.12 for 7.0
-
-* Mon May  8 2000 Bernhard Rosenkraenzer <bero at redhat.com>
-- 0.11.1
-- Qt 2.1.0
-
-* Wed Feb  2 2000 Bernhard Rosenkraenzer <bero at redhat.com>
-- 0.10.1
-- Qt 1.45
-- handle RPM_OPT_FLAGS
-
-* Tue Dec 21 1999 Ngo Than <than at redhat.de>
-- updated 0.10
-
-* Tue Dec 14 1999 Ngo Than <than at redhat.de>
-- 0.10pre5
-
-* Sun Nov 28 1999 Ngo Than <than at redhat.de>
-- Initial packaging as RPM for powertools-6.2




More information about the fedora-extras-commits mailing list