From af9425cdbe8ab8e49e7fcf81556bf0b051d5e9f9191e08deb8a234614c445bd5 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 9 Jan 2019 09:20:04 +0000 Subject: [PATCH] Accepting request 663652 from home:wolfi323:branches:KDE:Qt5 - Build a private Qt4 module as well, that's needed by the latest python-qt4 (boo#1119636) OBS-URL: https://build.opensuse.org/request/show/663652 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/python-sip?expand=0&rev=22 --- python-sip.changes | 6 ++++++ python-sip.spec | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/python-sip.changes b/python-sip.changes index 97c5788..75bd25f 100644 --- a/python-sip.changes +++ b/python-sip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jan 6 02:06:41 UTC 2019 - wbauer@tmo.at + +- Build a private Qt4 module as well, that's needed by the latest + python-qt4 (boo#1119636) + ------------------------------------------------------------------- Wed Dec 19 19:54:05 UTC 2018 - Todd R diff --git a/python-sip.spec b/python-sip.spec index 2843b86..d3cd79e 100644 --- a/python-sip.spec +++ b/python-sip.spec @@ -129,6 +129,24 @@ sed -i 's/"doc" directory/"doc" directory of package %{$python_prefix}-sip-devel popd } +# Now build the PyQt4 sip module +%{python_expand mkdir build_PyQt4_%{$python_bin_suffix} +pushd build_PyQt4_%{$python_bin_suffix} + +# Link against libpython +ldlibrary=`$python -c "import sysconfig as s;print(s.get_config_var('LDLIBRARY')[3:-3])"` +$python ../configure.py --debug \ + --sip-module=PyQt4.sip \ + CFLAGS+="%{optflags}" \ + CXXFLAGS+="%{optflags}" \ + LIBS+="-l$ldlibrary" \ + --no-dist-info + +make %{?_smp_mflags} + +popd +} + # Now build the PyQt5 sip module %{python_expand mkdir build_PyQt5_%{$python_bin_suffix} pushd build_PyQt5_%{$python_bin_suffix} @@ -160,6 +178,11 @@ mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/sip-%{$python_bin_suffix} sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{python_sitearch}/sipconfig.py } +%{python_expand pushd build_PyQt4_%{$python_bin_suffix} +%make_install +popd +} + %{python_expand pushd build_PyQt5_%{$python_bin_suffix} %make_install popd @@ -198,6 +221,8 @@ mkdir -p %{buildroot}%{_datadir}/sip %doc ChangeLog NEWS %doc build_%{python_bin_suffix}/README %{python_sitearch}/sip.so +%dir %{python_sitearch}/PyQt4 +%{python_sitearch}/PyQt4/sip.so %dir %{python_sitearch}/PyQt5 %{python_sitearch}/PyQt5/sip.so @@ -205,6 +230,8 @@ mkdir -p %{buildroot}%{_datadir}/sip %license LICENSE* %{_rpmconfigdir}/macros.d/macros.%{python_prefix}-sip %python_alternative %{_bindir}/sip +%dir %{python_sitearch}/PyQt4 +%{python_sitearch}/PyQt4/sip.pyi %dir %{python_sitearch}/PyQt5 %{python_sitearch}/PyQt5/sip.pyi %{_includedir}/python%{python_version}*/sip.h