Accepting request 115249 from home:adra:branches:KDE:Qt

Fix for bnc#756282 and bnc#721280

OBS-URL: https://build.opensuse.org/request/show/115249
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt/python-sip?expand=0&rev=74
This commit is contained in:
Ismail Dönmez 2012-04-24 20:22:11 +00:00 committed by Git OBS Bridge
parent 02d14805e6
commit 130872ef1f
4 changed files with 71 additions and 45 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 10 20:38:21 UTC 2012 - asterios.dramis@gmail.com
- Link against libpython. Fixes bnc#756282 and bnc#721280.
- Remove SUSE_ASNEEDED=0 from spec file.
-------------------------------------------------------------------
Fri Mar 23 09:39:46 UTC 2012 - cfarrell@suse.com

View File

@ -15,21 +15,25 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define rversion %{version}
Name: python-sip
BuildRequires: c++_compiler
BuildRequires: python
BuildRequires: python-devel
Version: 4.13.2
Release: 0
Summary: SIP tool to use python sip bindings
License: GPL-2.0 or GPL-3.0 or SUSE-SIP
Group: Development/Libraries/Python
Version: 4.13.2
Release: 0
%define rversion %version
Url: http://www.riverbankcomputing.com/software/sip/intro
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.riverbankcomputing.com/static/Downloads/sip4/sip-%{rversion}.tar.gz
# PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths
Patch0: disable-rpaths.diff
# PATCH-FIX-OPENSUSE build-compare.diff cmorve69@yahoo.es -- Fix build-compare
Patch1: build-compare.diff
BuildRequires: c++_compiler
BuildRequires: python
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%description
@ -41,8 +45,10 @@ for any C or C++ library.
%package devel
Summary: SIP tool to create python bindings
Group: Development/Libraries/Python
Requires: %name = %version
Requires: c++_compiler python-devel python-sip-bin
Requires: %{name} = %{version}
Requires: c++_compiler
Requires: python-devel
Requires: python-sip-bin
%description devel
SIP is a tool that makes it very easy to create Python bindings for C
@ -53,7 +59,6 @@ for any C or C++ library.
This package contains all the developer tools you need to create your
own sip bindings.
%package bin
Summary: SIP tool to create python bindings
Group: Development/Libraries/Python
@ -65,7 +70,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 the sip executable
This package contains the sip executable.
%prep
%setup -q -n sip-%{rversion}
@ -73,35 +78,35 @@ This package contains the sip executable
%patch1
%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
export SUSE_ASNEEDED=0
python configure.py --debug CFLAGS+="$RPM_OPT_FLAGS" CXXFLAGS+="$RPM_OPT_FLAGS"
make %{?jobs:-j %jobs}
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
# Link against libpython (fixes bnc#756282 and bnc#721280)
python configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LIBS+="-lpython%{py_ver}"
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/usr/share/sip
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_datadir}/sip
# Point to the correct location for the documentation files
sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc README
%{py_sitedir}/sip.so
%files bin
%defattr(-,root,root)
/usr/bin/sip
%defattr(-,root,root,-)
%{_bindir}/sip
%files devel
%defattr(-,root,root)
%doc NEWS LICENSE doc
%defattr(-,root,root,-)
%doc NEWS LICENSE* doc/
%{py_incdir}/sip.h
%{py_sitedir}/sipconfig.py
%{py_sitedir}/sipdistutils.py
/usr/share/sip
%{_datadir}/sip/
%changelog

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Apr 11 13:40:14 UTC 2012 - asterios.dramis@gmail.com
- Link against libpython. Fixes bnc#756282 and bnc#721280.
- license update: GPL-2.0 or GPL-3.0 or SUSE-SIP
Use SUSE- proprietary extension until SIP license is accepted upstream at
spdx.org
- Remove SUSE_ASNEEDED=0 from spec file.
-------------------------------------------------------------------
Mon Nov 21 10:33:26 UTC 2011 - cgiboudeaux@gmx.com

View File

@ -15,31 +15,36 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%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)
%global py3_ver %(python3 -c "import sys; v=sys.version_info[:2]; print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON-NOT-FOUND)
%global py3_abi %(python3-config --abiflags)
%define rversion %{version}
Name: python3-sip
Version: 4.13.2
Release: 0
Summary: SIP tool to use python sip bindings
License: GPL-2.0 or GPL-3.0 or SIP
License: GPL-2.0 or GPL-3.0 or SUSE-SIP
Group: Development/Libraries/Python
%define rversion %{version}
Url: http://www.riverbankcomputing.com/software/sip/intro
Source0: http://www.riverbankcomputing.com/static/Downloads/sip4/sip-%{rversion}.tar.gz
# PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths
Patch0: disable-rpaths.diff
# PATCH-FIX-OPENSUSE build-compare.diff cmorve69@yahoo.es -- Fix build-compare
Patch1: build-compare.diff
BuildRequires: c++_compiler
BuildRequires: python3
BuildRequires: python3-devel
Requires(pre): python3
Requires: python3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1140
Requires(pre): python3-base
Requires: python3-base
%endif
%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)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SIP is a tool that makes it very easy to create Python bindings for C
@ -73,31 +78,32 @@ own sip bindings.
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export SUSE_ASNEEDED=0
python3 configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}"
# Link against libpython (fixes bnc#756282 and bnc#721280)
python3 configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LIBS+="-lpython%{py3_ver}%{py3_abi}"
make %{?_smp_mflags}
%install
%make_install
%{make_install}
mkdir -p %{buildroot}%{_datadir}/sip
# Point to the correct location for the documentation files
sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README
# sip executable is provided by python-sip-bin to avoid conflicts
rm %{buildroot}%{_bindir}/sip
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc README
%{python3_sitearch}/sip.so
%files devel
%defattr(-,root,root)
%doc NEWS LICENSE doc
%defattr(-,root,root,-)
%doc NEWS LICENSE* doc/
%{py3_incdir}/sip.h
%{python3_sitearch}/sipconfig.py
%{python3_sitearch}/sipdistutils.py
%{_datadir}/sip
%{_datadir}/sip/
%changelog