commit python-sip for openSUSE:Factory
Hello community, here is the log from the commit of package python-sip for openSUSE:Factory checked in at 2020-11-02 09:37:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sip (Old) and /work/SRC/openSUSE:Factory/.python-sip.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-sip" Mon Nov 2 09:37:03 2020 rev:107 rq:844384 version:4.19.24 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sip/python-sip.changes 2020-09-03 01:12:44.596439425 +0200 +++ /work/SRC/openSUSE:Factory/.python-sip.new.3463/python-sip.changes 2020-11-02 09:37:12.113426177 +0100 @@ -1,0 +2,7 @@ +Sun Oct 25 21:22:24 UTC 2020 - Benjamin Greiner <code@bnavigator.de> + +- Fix for multiple python3 flavors gh#openSUSE/python-rpm-macros#64 +- clean up alternatives: use %python_clone -a +- only make install in siplib for PyQt4.sip and PyQt5.sip libraries + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sip.spec ++++++ --- /var/tmp/diff_new_pack.HY34ED/_old 2020-11-02 09:37:13.833427827 +0100 +++ /var/tmp/diff_new_pack.HY34ED/_new 2020-11-02 09:37:13.837427831 +0100 @@ -165,52 +165,51 @@ } %install -mkdir -p %{buildroot}%{_sysconfdir}/alternatives - %{python_expand pushd build_%{$python_bin_suffix} %make_install popd -# Prepare for update-alternatives usage -mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/sip-%{$python_bin_suffix} -# Make sure the correct sip executable is picked -sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{python_sitearch}/sipconfig.py -} - -%{python_expand pushd build_PyQt4_%{$python_bin_suffix} +pushd build_PyQt4_%{$python_bin_suffix}/siplib %make_install popd -} -%{python_expand pushd build_PyQt5_%{$python_bin_suffix} +pushd build_PyQt5_%{$python_bin_suffix}/siplib %make_install popd -%fdupes %{buildroot}%{python_sitearch} +# Make sure the correct sip executable is picked +sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{$python_sitearch}/sipconfig.py } mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d echo "%%python_sip_api_ver %{python_sip_api}" > %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip -%if 0%{?have_python2} -echo "%%requires_python2_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" > %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{python2_prefix}-sip -echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{python2_prefix}-sip - -%py_compile %{buildroot}%{python2_sitearch} +%{python_expand # flavor specific macros +echo "%%requires_$python_sip_api Requires: %{$python_prefix}-sip(api) = %%python_sip_api_ver" \ + > %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{$python_prefix}-sip +} +# macro for old python2 name +%if 0%{?have_python2} && ! 0%{?skip_python2} +echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" \ + >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{python2_prefix}-sip %endif - -%if 0%{?have_python3} -echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = %%python_sip_api_ver" > %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{python3_prefix}-sip - -%py3_compile %{buildroot}%{python3_sitearch} +# additional: default python3 in case of multiple python3 flavors +%if 0%{?have_python3} && ! 0%{?skip_python3} +grep '%%requires_%{python3_prefix}_sip_api' %{buildroot}%{_rpmconfigdir}/macros.d/macros.*-sip || \ + echo "%%requires_%{python3_prefix}_sip_api Requires: %{python_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip %endif -%prepare_alternative sip +%{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_expand %fdupes %{buildroot}%{$python_sitearch} mkdir -p %{buildroot}%{_datadir}/sip %post devel -%{python_install_alternative sip} +%python_install_alternative sip %postun devel %python_uninstall_alternative sip @@ -234,7 +233,7 @@ %{python_sitearch}/PyQt4/sip.pyi %dir %{python_sitearch}/PyQt5 %{python_sitearch}/PyQt5/sip.pyi -%{_includedir}/python%{python_version}*/sip.h +%{_includedir}/python%{python_bin_suffix}*/sip.h %{python_sitearch}/sipconfig.py* %{python_sitearch}/sipdistutils.py* %{python_sitearch}/sip.pyi
participants (1)
-
root