SHA256
1
0
forked from pool/python-sip4
Dominique Leuenberger 2021-02-26 21:02:28 +00:00 committed by Git OBS Bridge
commit 33c77415c0
4 changed files with 51 additions and 29 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Feb 26 18:47:32 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 4.19.25
* Added support for Py_ssize_t
- Prepare for a python-sip metapackage
- PyQt5 on SLE/Leap now also uses the SIPv5 build. Don't provide
the PyQt5.sip module for those either
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Nov 15 23:56:01 UTC 2020 - Benjamin Greiner <code@bnavigator.de> Sun Nov 15 23:56:01 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-sip # spec file for package python-sip4
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,14 +15,18 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%if 0%{suse_version} < 1550
# Build the PyQt4 and PyQt5 modules only for older distros. %if 0%{?suse_version} < 1550
%bcond_without pyqt_modules # Build the PyQt4.sip module only for older distros.
%bcond_without pyqt4_module
%else %else
#The python-qt5-sip provides the correct PyQt5 module for sip5 enabled distros %bcond_with pyqt4_module
%bcond_with pyqt_modules
%endif %endif
# The python-qt5-sip provides the correct PyQt5 module for sip5 enabled distros,
# including SLE/Leap build targets now
%bcond_with pyqt5_module
%define python_sip_api 12.7 %define python_sip_api 12.7
%define mname sip %define mname sip
%define pname sip4 %define pname sip4
@ -34,7 +38,7 @@
%define oldpython python %define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-%{pname} Name: python-%{pname}
Version: 4.19.24 Version: 4.19.25
Release: 0 Release: 0
Summary: SIP tool to use python sip bindings - legacy version 4 Summary: SIP tool to use python sip bindings - legacy version 4
License: GPL-2.0-only OR GPL-3.0-only OR SUSE-SIP License: GPL-2.0-only OR GPL-3.0-only OR SUSE-SIP
@ -51,14 +55,14 @@ BuildRequires: c++_compiler
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: %{name}-common = %{version} Requires: %{name}-common = %{version}
Provides: python-sip(api) = %{python_sip_api}
Provides: python-%{mname} = %{version}-%{release} Provides: python-%{mname} = %{version}-%{release}
Provides: python-sip(api) = %{python_sip_api}
Obsoletes: python-%{mname} < %{version}-%{release} Obsoletes: python-%{mname} < %{version}-%{release}
%ifpython2 %ifpython2
Provides: %{oldpython}-%{mname} = %{version}-%{release} Provides: %{oldpython}-%{mname} = %{version}-%{release}
Obsoletes: %{oldpython}-%{mname} < %{version}-%{release} Obsoletes: %{oldpython}-%{mname} < %{version}-%{release}
%endif %endif
%if %{with pyqt_modules} %if %{with pyqt5_module}
Conflicts: python-qt5-sip Conflicts: python-qt5-sip
%endif %endif
%python_subpackages %python_subpackages
@ -84,6 +88,8 @@ Provides: python-%{mname}-bin = %{version}-%{release}
Provides: python-%{mname}-devel = %{version}-%{release} Provides: python-%{mname}-devel = %{version}-%{release}
Obsoletes: python-%{mname}-bin < %{version}-%{release} Obsoletes: python-%{mname}-bin < %{version}-%{release}
Obsoletes: python-%{mname}-devel < %{version}-%{release} Obsoletes: python-%{mname}-devel < %{version}-%{release}
Conflicts: python-%{mname}-impl
Provides: python-%{mname}-impl = %{version}-%{release}
%ifpython2 %ifpython2
Provides: %{oldpython}-%{mname}-bin = %{version}-%{release} Provides: %{oldpython}-%{mname}-bin = %{version}-%{release}
Provides: %{oldpython}-%{mname}-devel = %{version}-%{release} Provides: %{oldpython}-%{mname}-devel = %{version}-%{release}
@ -103,7 +109,6 @@ own sip bindings.
%package -n python-%{pname}-doc %package -n python-%{pname}-doc
Summary: SIP tool to create python bindings -- common documentation Summary: SIP tool to create python bindings -- common documentation
Group: Development/Libraries/Python Group: Development/Libraries/Python
Provides: %{python_module %{mname}-doc = %{version}-%{release}}
Provides: %{python_module %{pname}-doc = %{version}-%{release}} Provides: %{python_module %{pname}-doc = %{version}-%{release}}
BuildArch: noarch BuildArch: noarch
@ -119,7 +124,6 @@ and python3 versions of sip.
%package -n python-%{pname}-common %package -n python-%{pname}-common
Summary: SIP tool to create python bindings -- common files Summary: SIP tool to create python bindings -- common files
Group: Development/Libraries/Python Group: Development/Libraries/Python
Provides: %{python_module %{mname}-common = %{version}-%{release}}
Provides: %{python_module %{pname}-common = %{version}-%{release}} Provides: %{python_module %{pname}-common = %{version}-%{release}}
BuildArch: noarch BuildArch: noarch
@ -167,9 +171,14 @@ sed -i 's/"doc" directory/"doc" directory of package %{$python_prefix}-sip-devel
popd popd
} }
%if %{with pyqt_modules} for P in \
for P in PyQt4 PyQt5; do %if %{with pyqt4_module}
echo "YESSIR" PyQt4 \
%endif
%if %{with pyqt5_module}
PyQt5 \
%endif
; do
%{python_expand mkdir build_${P}_%{$python_bin_suffix} %{python_expand mkdir build_${P}_%{$python_bin_suffix}
pushd build_${P}_%{$python_bin_suffix} pushd build_${P}_%{$python_bin_suffix}
@ -187,7 +196,6 @@ make %{?_smp_mflags}
popd popd
} }
done done
%endif
%install %install
@ -199,14 +207,19 @@ popd
sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{$python_sitearch}/sipconfig.py sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{$python_sitearch}/sipconfig.py
} }
%if %{with pyqt_modules} for P in \
for P in PyQt4 PyQt5; do %if %{with pyqt4_module}
PyQt4 \
%endif
%if %{with pyqt5_module}
PyQt5 \
%endif
; do
%{python_expand pushd build_${P}_%{$python_bin_suffix}/siplib %{python_expand pushd build_${P}_%{$python_bin_suffix}/siplib
%make_install %make_install
popd popd
} }
done done
%endif
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
@ -226,11 +239,7 @@ echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_
grep '%%requires_%{python3_prefix}_sip_api' %{buildroot}%{_rpmconfigdir}/macros.d/macros.*-sip4 || \ grep '%%requires_%{python3_prefix}_sip_api' %{buildroot}%{_rpmconfigdir}/macros.d/macros.*-sip4 || \
echo "%%requires_%{python3_prefix}_sip_api Requires: %{python_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip4 echo "%%requires_%{python3_prefix}_sip_api Requires: %{python_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip4
%endif %endif
%{?python_compileall}
%{python_expand # TODO replace with python_compileall as soon as it is available
$python -m compileall %{buildroot}%{$python_sitearch}
$python -O -m compileall %{buildroot}%{$python_sitearch}
}
%python_clone -a %{buildroot}/%{_bindir}/sip %python_clone -a %{buildroot}/%{_bindir}/sip
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
mkdir -p %{buildroot}%{_datadir}/sip mkdir -p %{buildroot}%{_datadir}/sip
@ -246,9 +255,11 @@ mkdir -p %{buildroot}%{_datadir}/sip
%doc ChangeLog NEWS %doc ChangeLog NEWS
%doc build_%{python_bin_suffix}/README %doc build_%{python_bin_suffix}/README
%{python_sitearch}/sip.so %{python_sitearch}/sip.so
%if %{with pyqt_modules} %if %{with pyqt4_module}
%dir %{python_sitearch}/PyQt4 %dir %{python_sitearch}/PyQt4
%{python_sitearch}/PyQt4/sip.so %{python_sitearch}/PyQt4/sip.so
%endif
%if %{with pyqt5_module}
%dir %{python_sitearch}/PyQt5 %dir %{python_sitearch}/PyQt5
%{python_sitearch}/PyQt5/sip.so %{python_sitearch}/PyQt5/sip.so
%endif %endif
@ -258,9 +269,11 @@ mkdir -p %{buildroot}%{_datadir}/sip
%license LICENSE* %license LICENSE*
%{_rpmconfigdir}/macros.d/macros.%{python_prefix}-sip4 %{_rpmconfigdir}/macros.d/macros.%{python_prefix}-sip4
%python_alternative %{_bindir}/sip %python_alternative %{_bindir}/sip
%if %{with pyqt_modules} %if %{with pyqt4_module}
%dir %{python_sitearch}/PyQt4 %dir %{python_sitearch}/PyQt4
%{python_sitearch}/PyQt4/sip.pyi %{python_sitearch}/PyQt4/sip.pyi
%endif
%if %{with pyqt5_module}
%dir %{python_sitearch}/PyQt5 %dir %{python_sitearch}/PyQt5
%{python_sitearch}/PyQt5/sip.pyi %{python_sitearch}/PyQt5/sip.pyi
%endif %endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:edcd3790bb01938191eef0f6117de0bf56d1136626c0ddb678f3a558d62e41e5
size 1055461

BIN
sip-4.19.25.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.