Dominique Leuenberger 2019-01-10 14:20:04 +00:00 committed by Git OBS Bridge
commit 2ffa795506
2 changed files with 46 additions and 7 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
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 <toddrme2178@gmail.com>
- Use upstream-recommended %{_rpmconfigdir}/macros.d directory
for the rpm macros.
-------------------------------------------------------------------
Sun Oct 21 09:31:18 UTC 2018 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -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
@ -167,19 +190,19 @@ popd
%fdupes %{buildroot}%{python_sitearch}
}
mkdir -p %{buildroot}/%{_sysconfdir}/rpm/
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
echo "%%python_sip_api_ver %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.python_all-sip
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}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
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}
%endif
%if 0%{?have_python3}
echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = %%python_sip_api_ver" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python3_prefix}-sip
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}
%endif
@ -198,13 +221,17 @@ 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
%files %{python_files devel}
%license LICENSE*
%config %{_sysconfdir}/rpm/macros.%{python_prefix}-sip
%{_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
@ -220,7 +247,7 @@ mkdir -p %{buildroot}%{_datadir}/sip
%files -n python-sip-common
%license LICENSE*
%config %{_sysconfdir}/rpm/macros.python_all-sip
%{_rpmconfigdir}/macros.d/macros.python_all-sip
%{_datadir}/sip/
%changelog