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
This commit is contained in:
Dirk Mueller 2011-11-21 17:02:25 +00:00 committed by Git OBS Bridge
parent 7616a52f61
commit b70fb8fdf4
2 changed files with 32 additions and 23 deletions

View File

@ -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 Wed Oct 26 20:19:38 UTC 2011 - Sascha.Manns@open-slx.de

View File

@ -15,32 +15,33 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Name: python3-sip 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 Version: 4.13
Release: 2 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 Url: http://www.riverbankcomputing.com/software/sip/intro
BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Libraries/Python
Source0: sip-%{rversion}.tar.bz2 Source0: sip-%{rversion}.tar.bz2
Patch0: disable-rpaths.diff Patch0: disable-rpaths.diff
Patch1: build-compare.diff Patch1: build-compare.diff
BuildRequires: c++_compiler BuildRequires: c++_compiler
BuildRequires: python3 python3-devel BuildRequires: python3
BuildRequires: python3-devel
Requires(pre): python3
Requires: python3 Requires: python3
PreReq: python3 BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1140 %if 0%{?suse_version} > 1140
Requires(pre): python3-base
Requires: python3-base Requires: python3-base
PreReq: python3-base
%endif %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 %description
SIP is a tool that makes it very easy to create Python bindings for C 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 %package devel
License: GPL-2.0 or GPL-3.0 or SIP License: GPL-2.0 or GPL-3.0 or SIP
Group: Development/Libraries/Python
Summary: SIP tool to create python bindings 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 Provides: python3-sip:/usr/bin/sip
Requires: %name = %version
Requires: c++_compiler python3-devel python-sip-bin
%description devel %description devel
SIP is a tool that makes it very easy to create Python bindings for C 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 Python bindings for the Qt toolkit, but can be used to create bindings
for any C or C++ library. 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. own sip bindings.
%prep %prep
@ -71,21 +74,21 @@ own sip bindings.
%patch1 %patch1
%build %build
export CFLAGS="$RPM_OPT_FLAGS" export CFLAGS="%{optflags}"
export CXXFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="%{optflags}"
export SUSE_ASNEEDED=0 export SUSE_ASNEEDED=0
python3 configure.py --debug CFLAGS+="$RPM_OPT_FLAGS" CXXFLAGS+="$RPM_OPT_FLAGS" python3 configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}"
make %{?jobs:-j %jobs} make %{?_smp_mflags}
%install %install
make DESTDIR=$RPM_BUILD_ROOT install %make_install
mkdir -p $RPM_BUILD_ROOT/usr/share/sip mkdir -p %{buildroot}%{_datadir}/sip
sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README
# sip executable is provided by python-sip-bin to avoid conflicts # sip executable is provided by python-sip-bin to avoid conflicts
rm $RPM_BUILD_ROOT/usr/bin/sip rm %{buildroot}%{_bindir}/sip
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -98,6 +101,6 @@ rm -rf $RPM_BUILD_ROOT
%{py3_incdir}/sip.h %{py3_incdir}/sip.h
%{python3_sitearch}/sipconfig.py %{python3_sitearch}/sipconfig.py
%{python3_sitearch}/sipdistutils.py %{python3_sitearch}/sipdistutils.py
/usr/share/sip %{_datadir}/sip
%changelog %changelog