python-sip/python-sip.spec
Ismail Dönmez 90de1c1f48 Accepting request 136482 from home:luca_b:branches:KDE:Qt
This is an update (see below) for the SIP package following the latest upstream
version. I have updated both the python2 and python3 spec files. Let me know if
I need to make a separate request for the py2 version.

- Update to latest upstream version:
  - The internal API version is increased to 9.0 requiring the regeneration
    of all modules.
  - Added the %InstanceCode directive.
  - Added the %VirtualErrorHandler directive.
  - Added the default_VirtualErrorHandler argument to the %Module directive.
  - Added the VirtualErrorHandler class annotation.
  - Added the NoVirtualErrorHandler and VirtualErrorHandler function
    annotations.
  - The AllowNone and NoRelease mapped type annotations can now be used
    with mapped type templates.
  - SIP_PLATFORM_* and SIP_TIMELINE_* preprocessor symbols are generated
    corresponding to the -t arguments passed on the command line.
  - Deprecated sipTransferBreak().
  - For Python v2.x unsigned short and unsigned char (when used as a byte)
    are now converted to int, rather than long, objects.
  - Added support for MSVC 2010 to the build system.
- 

- Update to the latest upstream version:
  - The internal API version is increased to 9.0 requiring the regeneration
    of all modules.
  - Added the %InstanceCode directive.
  - Added the %VirtualErrorHandler directive.
  - Added the default_VirtualErrorHandler argument to the %Module directive.
  - Added the VirtualErrorHandler class annotation.
  - Added the NoVirtualErrorHandler and VirtualErrorHandler function
    annotations.
  - The AllowNone and NoRelease mapped type annotations can now be used
    with mapped type templates.

OBS-URL: https://build.opensuse.org/request/show/136482
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt/python-sip?expand=0&rev=79
2012-10-02 07:27:30 +00:00

127 lines
4.1 KiB
RPMSpec

#
# spec file for package python-sip
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define rversion %{version}
%define python_sip_api 9.0
Name: python-sip
Version: 4.14
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
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: python
BuildRequires: python-devel
Provides: python-sip(api) = %python_sip_api
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%description
SIP is a tool that makes it very easy to create Python bindings for C
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.
%package devel
Summary: SIP tool to create python bindings
Group: Development/Libraries/Python
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
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
own sip bindings.
%package bin
Summary: SIP tool to create python bindings
Group: Development/Libraries/Python
Provides: python-sip:/usr/bin/sip
%description bin
SIP is a tool that makes it very easy to create Python bindings for C
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.
%prep
%setup -q -n sip-%{rversion}
%patch0
%patch1
%build
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}
sip_major=$(grep "define SIP_API_MAJOR_NR" siplib/sip.h.in | awk '{print $3}')
sip_minor=$(grep "define SIP_API_MINOR_NR" siplib/sip.h.in | awk '{print $3}')
if test "%python_sip_api" != "$sip_major.$sip_minor"; then
echo "API version was changed to $sip_major.$sip_minor"
exit 1
fi
echo "%%requires_python_sip_api Requires: python-sip(api) = $sip_major.$sip_minor" > macros.%name
%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_datadir}/sip
install -m 644 -D macros.%name %{buildroot}/%{_sysconfdir}/rpm/macros.%name
# Point to the correct location for the documentation files
sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README
%files
%defattr(-,root,root,-)
%doc README
%{py_sitedir}/sip.so
%files bin
%defattr(-,root,root,-)
%{_bindir}/sip
%files devel
%defattr(-,root,root,-)
%doc NEWS LICENSE* doc/
%config %{_sysconfdir}/rpm/macros.%name
%{py_incdir}/sip.h
%{py_sitedir}/sipconfig.py
%{py_sitedir}/sipdistutils.py
%{_datadir}/sip/
%changelog