diff --git a/python-qt5.spec b/python-qt5.spec index edfc97b..7619508 100644 --- a/python-qt5.spec +++ b/python-qt5.spec @@ -16,13 +16,19 @@ %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) +# f29+ no longer using separate sipdir for python3 +%global py3_sipdir %{_datadir}/sip/PyQt5 +%if 0%{?fedora} < 29 +%global py3_sipdir %{_datadir}/python3-sip/PyQt5 +%endif + # see also https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/JQQ66XJSIT2FGTK2YQY7AXMEH5IXMPUX/ %undefine _strict_symbol_defs_build Summary: PyQt5 is Python bindings for Qt5 Name: python-qt5 Version: 5.11.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 Url: http://www.riverbankcomputing.com/software/pyqt/ @@ -279,6 +285,7 @@ pushd %{_target_platform}-python3 --no-dist-info \ --qmake=%{_qt5_qmake} \ --no-qsci-api \ + %{?py3_sipdir:--sipdir=%{py3_sipdir}} \ --verbose \ QMAKE_CFLAGS_RELEASE="%{optflags}" \ QMAKE_CXXFLAGS_RELEASE="%{optflags}" \ @@ -294,6 +301,12 @@ popd # Python 3 build: %if 0%{?with_python3} %make_install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-python3 +%if "%py3_sipdir" == "%{_datadir}/sip/PyQt5" +# copy files to old location for compat purposes temporarily +mkdir -p %{buildroot}%{_datadir}/python3-sip +cp -alf %{buildroot}%{py3_sipdir} \ + %{buildroot}%{_datadir}/python3-sip/PyQt5 +%endif # ensure .so modules are executable for proper -debuginfo extraction for i in %{buildroot}%{python3_sitearch}/PyQt5/*.so %{buildroot}%{python3_dbus_dir}/pyqt5.so ; do test -x $i || chmod a+rx $i @@ -479,8 +492,10 @@ sed -i \ %endif %files -n python%{python3_pkgversion}-qt5-devel -# fyi, now shared with pyhonw2-qt5-devel -- rex -%{_datadir}/sip/PyQt5/ +%{py3_sipdir}/ +# compat location +%dir %{_datadir}/python3-sip/ +%{_datadir}/python3-sip/PyQt5/ %endif # with_python3 %files doc @@ -494,6 +509,9 @@ sed -i \ %changelog +* Tue Aug 14 2018 Rex Dieter - 5.11.2-3 +- support compat py3_sipdir + * Mon Jul 30 2018 Sandro Mani - 5.11.2-2 - Add missing Requires: python2-enum34