From df59c903f1541569c3c1d7ffdd444c56d18ff9e1ed3bcb70c792304a641245c8 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 5 Jul 2021 17:54:11 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:PyQt/python-sip?expand=0&rev=1 --- README.SUSE | 3 ++ python-sip.changes | 14 ++++++ python-sip.spec | 104 ++++++++++++++++++--------------------------- sip-5.5.0.tar.gz | 3 -- 4 files changed, 59 insertions(+), 65 deletions(-) create mode 100644 README.SUSE delete mode 100644 sip-5.5.0.tar.gz diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..c433d48 --- /dev/null +++ b/README.SUSE @@ -0,0 +1,3 @@ +This is a meta package providing the preferred SIP version for the distribution. +It should always depend on the preferred numbered version of the SIP build tools, so +"python-sipX-devel" where "X" is the major version number. \ No newline at end of file diff --git a/python-sip.changes b/python-sip.changes index d0e19a9..e686eee 100644 --- a/python-sip.changes +++ b/python-sip.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Feb 26 09:46:06 UTC 2021 - Ben Greiner + +- Upgrade defaults: SIPv6 for TW + +------------------------------------------------------------------- +Fri Feb 19 23:02:37 UTC 2021 - Ben Greiner + +- Make this a meta package + * Depends on python-sip5 as default for Tumbleweed + * Depends on python-sip4 for Leap 15.3 and older + * Package python-sip6 is new and might become default in the + future. + ------------------------------------------------------------------- Tue Nov 24 15:01:26 UTC 2020 - Benjamin Greiner diff --git a/python-sip.spec b/python-sip.spec index 4328e0c..4b06302 100644 --- a/python-sip.spec +++ b/python-sip.spec @@ -1,7 +1,7 @@ # # spec file for package python-sip # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,60 +16,60 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%if 0%{?suse_version} <= 1500 +%define sipN sip4 +%else +%define sipN sip6 +%endif + +# query the default provider and assume that all installed python flavors have the same version +%define Nversion %(rpm -q --qf '%%{version}' --whatprovides python3-%{sipN}-devel) +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 +%define plainpython python Name: python-sip -Version: 5.5.0 +Version: %{Nversion} Release: 0 Summary: A Python bindings generator for C/C++ libraries License: GPL-2.0-only OR GPL-3.0-only OR SUSE-SIP Group: Development/Libraries/Python URL: https://www.riverbankcomputing.com/software/sip -Source0: https://files.pythonhosted.org/packages/source/s/sip/sip-%{version}.tar.gz -BuildRequires: %{python_module devel} -BuildRequires: %{python_module packaging} -BuildRequires: %{python_module qt5-sip} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module toml} -BuildRequires: %{pythons >= 3.5.1} -BuildRequires: c++_compiler -BuildRequires: fdupes +Source0: README.SUSE +BuildRequires: %{python_module %{sipN}-devel} BuildRequires: python-rpm-macros - +BuildArch: noarch +%requires_eq python-%{sipN} %python_subpackages %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. +SIP is a collection of tools that makes it very easy to create Python +bindings for C and C++ libraries. It was originally developed in 1998 +to create PyQt, the Python bindings for the Qt toolkit, but can be used +to create bindings for any C or C++ library. For example it is also used +to generate wxPython, the Python bindings for wxWidgets. %package devel Summary: A Python bindings generator for C/C++ libraries Group: Development/Libraries/Python -Requires: c++_compiler -Requires: python >= 3.5.1 -Requires: python-devel -# python-qt5-sip provides the QtPy5.sip module and macros -Requires: python-qt5-sip -Requires: python-setuptools -Requires: python-toml -Requires(post): update-alternatives -Requires(postun): update-alternatives +%requires_eq python-%{sipN}-devel %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. +SIP is a collection of tools that makes it very easy to create Python +bindings for C and C++ libraries. It was originally developed in 1998 +to create PyQt, the Python bindings for the Qt toolkit, but can be used +to create bindings for any C or C++ library. For example it is also used +to generate wxPython, the Python bindings for wxWidgets. This package contains all the developer tools you need to create your -own sip bindings. +own sip bindings in the currently default version. Look for +%{python_prefix}-sip-devel, if you need to build a package with a +specific version of SIP v. %package -n python-sip-doc Summary: A Python bindings generator for C/C++ libraries -- common documentation Group: Development/Libraries/Python Provides: %{python_module sip-doc = %{version}-%{release}} +%requires_eq %{plainpython}-%{sipN}-doc %description -n python-sip-doc SIP is a tool that makes it very easy to create Python bindings for C @@ -77,47 +77,27 @@ 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 documentation and example files. +This package contains the documentation and example files in the +currently default version. Look for %{python_prefix}-sip-devel, +if you need to build a package with a specific version of SIP v. %prep -%setup -q -n sip-%{version} -%autopatch -p1 +%setup -q -T -c +cp %{SOURCE0} . %build -%python_build +: %install -%python_install -%python_clone -a %{buildroot}%{_bindir}/sip-build -%python_clone -a %{buildroot}%{_bindir}/sip-distinfo -%python_clone -a %{buildroot}%{_bindir}/sip-install -%python_clone -a %{buildroot}%{_bindir}/sip-module -%python_clone -a %{buildroot}%{_bindir}/sip-sdist -%python_clone -a %{buildroot}%{_bindir}/sip-wheel -%python_clone -a %{buildroot}%{_bindir}/sip5 -%python_expand %fdupes %{buildroot}%{$python_sitearch} -%fdupes -s doc +: -%post devel -%python_install_alternative sip-build sip-distinfo sip-install sip-module sip-sdist sip-wheel sip5 - -%postun devel -%python_uninstall_alternative sip-build +%files %{python_files} +%doc README.SUSE %files %{python_files devel} -%license LICENSE* -%python_alternative %{_bindir}/sip-build -%python_alternative %{_bindir}/sip-distinfo -%python_alternative %{_bindir}/sip-install -%python_alternative %{_bindir}/sip-module -%python_alternative %{_bindir}/sip-sdist -%python_alternative %{_bindir}/sip-wheel -%python_alternative %{_bindir}/sip5 -%{python_sitearch}/sipbuild -%{python_sitearch}/sip-%{version}-py*.egg-info +%doc README.SUSE %files -n python-sip-doc -%license LICENSE* -%doc doc/ +%doc README.SUSE %changelog diff --git a/sip-5.5.0.tar.gz b/sip-5.5.0.tar.gz deleted file mode 100644 index 4cbbef5..0000000 --- a/sip-5.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d024c419b30fea8a6de8c71a560c7ab0bc3c221fbfb14d55a5b865bd58eaac5 -size 1108126