Accepting request 483403 from home:TheBlackCat:branches:KDE:Qt

This version should fix the issues that resulted in the previous version being rejected by Factory.

- Fix Provides macro.
- Split largest part of docs into own subpackage to reduce package size.

OBS-URL: https://build.opensuse.org/request/show/483403
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt/python-sip?expand=0&rev=147
This commit is contained in:
Mikhail Terekhov 2017-03-30 00:23:34 +00:00 committed by Git OBS Bridge
parent 407fc5e200
commit ed87965e14
2 changed files with 31 additions and 17 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Mar 29 15:38:33 UTC 2017 - toddrme2178@gmail.com
- Fix Provides macro.
- Split largest part of docs into own subpackage to reduce package
size.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Mar 11 03:51:53 UTC 2017 - toddrme2178@gmail.com Sat Mar 11 03:51:53 UTC 2017 - toddrme2178@gmail.com

View File

@ -19,8 +19,8 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sip Name: python-sip
Version: 4.19.1 Version: 4.19.1
%define python_sip_api 12.1
Release: 0 Release: 0
%define python_sip_api 12.1
Summary: SIP tool to use python sip bindings Summary: SIP tool to use python sip bindings
License: GPL-2.0 or GPL-3.0 or SUSE-SIP License: GPL-2.0 or GPL-3.0 or SUSE-SIP
Group: Development/Libraries/Python Group: Development/Libraries/Python
@ -28,16 +28,11 @@ Url: http://www.riverbankcomputing.com/software/sip/introa
Source0: sip-%{version}.tar.gz Source0: sip-%{version}.tar.gz
# PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths # PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths
Patch0: disable-rpaths.diff Patch0: disable-rpaths.diff
BuildRequires: %{python_module devel}
BuildRequires: c++_compiler BuildRequires: c++_compiler
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
Requires: %{name}-common = %{version} Requires: %{name}-common = %{version}
%ifpython2 Provides: python-sip(api) = %{python_sip_api}
Provides: %{python2_prefix}-sip(api) = %{python_sip_api}
%endif
%ifpython3
Provides: %{python3_prefix}-sip(api) = %{python_sip_api}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages %python_subpackages
@ -70,11 +65,27 @@ This package contains all the developer tools you need to create your
own sip bindings. own sip bindings.
%package -n %{name}-doc
Summary: SIP tool to create python bindings -- common documentation
Group: Development/Libraries/Python
Provides: %{python_module sip-doc = %{version}}
%description -n %{name}-doc
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 common documentation files shared between python2
and python3 versions of sip.
%package -n %{name}-common %package -n %{name}-common
Summary: SIP tool to create python bindings -- common files Summary: SIP tool to create python bindings -- common files
Group: Development/Libraries/Python
Provides: %{python_module sip-common = %{version}} Provides: %{python_module sip-common = %{version}}
%description -n python-sip-common %description -n %{name}-common
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
and C++ libraries. It was originally developed to create PyQt, the 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
@ -96,7 +107,6 @@ if test "%{python_sip_api}" != "$sip_major.$sip_minor"; then
exit 1 exit 1
fi fi
%build %build
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}" export CXXFLAGS="%{optflags}"
@ -116,7 +126,6 @@ sed -i 's/"doc" directory/"doc" directory of package %{$python_prefix}-sip-devel
popd popd
} }
%install %install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives
@ -145,26 +154,21 @@ echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = $sip_maj
%py3_compile %{buildroot}%{python3_sitearch} %py3_compile %{buildroot}%{python3_sitearch}
%endif %endif
%prepare_alternative sip %prepare_alternative sip
mkdir -p %{buildroot}%{_datadir}/sip mkdir -p %{buildroot}%{_datadir}/sip
%post devel %post devel
%{python_install_alternative sip} %{python_install_alternative sip}
%postun devel %postun devel
%python_uninstall_alternative sip %python_uninstall_alternative sip
%files %{python_files} %files %{python_files}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog LICENSE* NEWS %doc ChangeLog LICENSE* NEWS
%doc doc/
%doc build_%{python_bin_suffix}/README %doc build_%{python_bin_suffix}/README
%{python_sitearch}/sip.so %{python_sitearch}/sip.so
%files %{python_files devel} %files %{python_files devel}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE* %doc LICENSE*
@ -177,11 +181,14 @@ mkdir -p %{buildroot}%{_datadir}/sip
%pycache_only %{python_sitearch}/__pycache__/sipconfig.*.py* %pycache_only %{python_sitearch}/__pycache__/sipconfig.*.py*
%pycache_only %{python_sitearch}/__pycache__/sipdistutils.*.py* %pycache_only %{python_sitearch}/__pycache__/sipdistutils.*.py*
%files -n python-sip-doc
%defattr(-,root,root,-)
%doc LICENSE*
%doc doc/
%files -n python-sip-common %files -n python-sip-common
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE* %doc LICENSE*
%{_datadir}/sip/ %{_datadir}/sip/
%changelog %changelog