From b70fb8fdf4294c07cf42271136083a9567328f3f53a7255dfaf2779d53cc7cc3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 21 Nov 2011 17:02:25 +0000 Subject: [PATCH] Accepting request 92833 from home:cgiboudeaux:branches:KDE:Qt Fix the 11.3/11.4 python3-sip build OBS-URL: https://build.opensuse.org/request/show/92833 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt/python-sip?expand=0&rev=66 --- python3-sip.changes | 6 ++++++ python3-sip.spec | 49 ++++++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/python3-sip.changes b/python3-sip.changes index b372a21..e43c333 100644 --- a/python3-sip.changes +++ b/python3-sip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 21 10:33:26 UTC 2011 - cgiboudeaux@gmx.com + +- Define python3_sitearch (fixes the <12.1 build) +- Spec cleanup + ------------------------------------------------------------------- Wed Oct 26 20:19:38 UTC 2011 - Sascha.Manns@open-slx.de diff --git a/python3-sip.spec b/python3-sip.spec index 2867a21..d98dd16 100644 --- a/python3-sip.spec +++ b/python3-sip.spec @@ -15,32 +15,33 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: python3-sip -License: GPL-2.0 or GPL-3.0 or SIP -Group: Development/Libraries/Python -Summary: SIP tool to use python sip bindings Version: 4.13 Release: 2 -%define rversion %version +License: GPL-2.0 or GPL-3.0 or SIP +Summary: SIP tool to use python sip bindings +%define rversion %{version} Url: http://www.riverbankcomputing.com/software/sip/intro -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Group: Development/Libraries/Python Source0: sip-%{rversion}.tar.bz2 Patch0: disable-rpaths.diff Patch1: build-compare.diff BuildRequires: c++_compiler -BuildRequires: python3 python3-devel +BuildRequires: python3 +BuildRequires: python3-devel +Requires(pre): python3 Requires: python3 -PreReq: python3 +BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1140 +Requires(pre): python3-base Requires: python3-base -PreReq: python3-base %endif -%global py3_incdir %(python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())" 2>/dev/null || echo PYTHON-NOT-FOUND) +%global py3_incdir %(python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(True))" 2>/dev/null || echo PYTHON-NOT-FOUND) +%global python3_sitearch %(python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(True))" 2>/dev/null || echo PYTHON-NOT-FOUND) %description SIP is a tool that makes it very easy to create Python bindings for C @@ -50,11 +51,13 @@ for any C or C++ library. %package devel License: GPL-2.0 or GPL-3.0 or SIP -Group: Development/Libraries/Python Summary: SIP tool to create python bindings +Group: Development/Libraries/Python +Requires: %{name} = %{version} +Requires: c++_compiler +Requires: python-sip-bin +Requires: python3-devel Provides: python3-sip:/usr/bin/sip -Requires: %name = %version -Requires: c++_compiler python3-devel python-sip-bin %description devel SIP is a tool that makes it very easy to create Python bindings for C @@ -62,7 +65,7 @@ and C++ libraries. It was originally developed to create PyQt, the Python bindings for the Qt toolkit, but can be used to create bindings for any C or C++ library. -This package contains all the developer tools you need to create your +This package contains all the developer tools you need to create your own sip bindings. %prep @@ -71,21 +74,21 @@ own sip bindings. %patch1 %build -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS" +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" export SUSE_ASNEEDED=0 -python3 configure.py --debug CFLAGS+="$RPM_OPT_FLAGS" CXXFLAGS+="$RPM_OPT_FLAGS" -make %{?jobs:-j %jobs} +python3 configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" +make %{?_smp_mflags} %install -make DESTDIR=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/usr/share/sip +%make_install +mkdir -p %{buildroot}%{_datadir}/sip sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README # sip executable is provided by python-sip-bin to avoid conflicts -rm $RPM_BUILD_ROOT/usr/bin/sip +rm %{buildroot}%{_bindir}/sip %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files %defattr(-,root,root) @@ -98,6 +101,6 @@ rm -rf $RPM_BUILD_ROOT %{py3_incdir}/sip.h %{python3_sitearch}/sipconfig.py %{python3_sitearch}/sipdistutils.py -/usr/share/sip +%{_datadir}/sip %changelog