- Remove Source URL, the validator doesn't work too well with SourceForge - add patch to disable qml_debug: disable_qml_debug.diff. Without this, the message "QML debugging is enabled. Only use this in a safe environment." appears on PyQt5 apps startup, and allows qmljsdebugger to connect via network. - make utils dependent on exact version - Update to 5.7 * Added support for Qt v5.7.0. * Removed patch pyqt5-fix-dbus-config.diff as applyed upstream OBS-URL: https://build.opensuse.org/request/show/440372 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qt5?expand=0&rev=17
201 lines
6.8 KiB
RPMSpec
201 lines
6.8 KiB
RPMSpec
#
|
|
# spec file for package python-qt5
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-qt5
|
|
Version: 5.7
|
|
Release: 0
|
|
Summary: PyQt - python bindings for Qt 5
|
|
License: SUSE-GPL-2.0-with-FLOSS-exception or GPL-3.0 or SUSE-NonFree
|
|
Group: Development/Libraries/Python
|
|
Url: http://www.riverbankcomputing.com/software/pyqt/intro
|
|
Source: PyQt5_gpl-%{version}.tar.gz
|
|
Source99: %{name}-rpmlintrc
|
|
# PATCH-FIX-OPENSUSE: DIsable RPATH
|
|
Patch1: disable-rpaths.diff
|
|
# PATCH-FIX-UPSTREAM: fix_qreal_check.diff -- check if qreal is double based on sizeof
|
|
Patch2: fix_qreal_check.diff
|
|
# PATCH-FIX-OPENSUSE: disable qml_debug -- debug builds add this, but it creates a security hole
|
|
Patch3: disable_qml_debug.diff
|
|
BuildRequires: dbus-1-devel
|
|
BuildRequires: dbus-1-devel
|
|
BuildRequires: dbus-1-python-devel
|
|
BuildRequires: gdb
|
|
BuildRequires: libQt5WebKit5-devel
|
|
BuildRequires: libQt5WebKitWidgets-devel
|
|
BuildRequires: libqt5-qtbase-devel
|
|
BuildRequires: libqt5-qtdeclarative-devel
|
|
BuildRequires: libqt5-qtlocation-devel
|
|
BuildRequires: libqt5-qtmultimedia-devel
|
|
BuildRequires: libqt5-qtserialport-devel
|
|
BuildRequires: libqt5-qtsvg-devel
|
|
BuildRequires: libqt5-qttools-devel
|
|
BuildRequires: libqt5-qtwebchannel-devel
|
|
%if 0%{?suse_version} >= 1320
|
|
%ifnarch ppc ppc64 ppc64le s390 s390x
|
|
BuildRequires: libqt5-qtwebengine-devel
|
|
%endif
|
|
%endif
|
|
BuildRequires: libqt5-qtconnectivity-devel
|
|
BuildRequires: libqt5-qtwebsockets-devel
|
|
BuildRequires: libqt5-qtx11extras-devel
|
|
BuildRequires: libqt5-qtxmlpatterns-devel
|
|
BuildRequires: pkg-config
|
|
#BuildRequires: phonon-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-sip-devel >= 4.18.1
|
|
%requires_ge dbus-1-python
|
|
%requires_ge libqt5-x11
|
|
%py_requires
|
|
%requires_python_sip_api
|
|
|
|
%description
|
|
PyQt is a set of Python bindings for Trolltech's Qt application
|
|
framework and runs on all platforms supported by Qt including Windows,
|
|
MacOS/X and Linux. There are two sets of bindings: PyQt v5 supports Qt
|
|
v5, and it can be co-installed with PyQt4.
|
|
|
|
%package devel
|
|
Summary: PyQt - devel part of python bindings for Qt 5
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: libQt5WebKit5-devel
|
|
Requires: libQt5WebKitWidgets-devel
|
|
Requires: libqt5-qtbase-devel
|
|
Requires: libqt5-qtdeclarative-devel
|
|
Requires: libqt5-qtsvg-devel
|
|
Requires: libqt5-qttools-devel
|
|
Requires: libqt5-qtx11extras-devel
|
|
Requires: python-qt5-utils
|
|
Requires: python-sip-devel >= 4.18.1
|
|
Requires: update-alternatives
|
|
|
|
%description devel
|
|
PyQt is a set of Python bindings for Trolltech's Qt application
|
|
framework and runs on all platforms supported by Qt including Windows,
|
|
MacOS/X and Linux. There are two sets of bindings: PyQt v5 supports Qt
|
|
v5, and it can be co-installed with PyQt4.
|
|
|
|
This package contains all the developer tools you need to create your
|
|
own PyQt applications.
|
|
|
|
%package utils
|
|
Summary: Common files for PyQt5 for python2 and python3
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: update-alternatives
|
|
|
|
%description utils
|
|
This package is needed to avoid conflicts between python-qt5 and
|
|
python3-qt5 packages. It contains files common to both of them i.e.
|
|
sip files used to generate bindings and utilities pylupdate5 and pyrcc5
|
|
|
|
%prep
|
|
%setup -q -n PyQt5_gpl-%{version}
|
|
#PATCH-FIX-OPENSUSE: Disable RPATH when building PyQt5.
|
|
%patch1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
%build
|
|
export CXXFLAGS="%{optflags}"
|
|
export CFLAGS="%{optflags}"
|
|
python configure.py --verbose \
|
|
--confirm-license \
|
|
--qsci-api \
|
|
--debug \
|
|
--qmake %{_libqt5_qmake} \
|
|
QMAKE_CFLAGS+="${CFLAGS} ${CPPFLAGS}" \
|
|
QMAKE_CXXFLAGS+="${CXXFLAGS} ${CPPFLAGS}"
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install INSTALL_ROOT=%{buildroot}
|
|
|
|
# Alternatives to prevent conflicts
|
|
|
|
# pyuic5
|
|
|
|
mv %{buildroot}%{_bindir}/pyuic5 %{buildroot}%{_bindir}/pyuic5-%{py_ver}
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/pyuic5
|
|
ln -s -f %{_sysconfdir}/alternatives/pyuic5 %{buildroot}/%{_bindir}/pyuic5
|
|
|
|
#pylupdate5
|
|
|
|
mv %{buildroot}%{_bindir}/pylupdate5 %{buildroot}%{_bindir}/pylupdate5-%{py_ver}
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/pylupdate5
|
|
ln -s -f %{_sysconfdir}/alternatives/pylupdate5 %{buildroot}/%{_bindir}/pylupdate5
|
|
|
|
#pyrcc5
|
|
|
|
mv %{buildroot}%{_bindir}/pyrcc5 %{buildroot}%{_bindir}/pyrcc5-%{py_ver}
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/pyrcc5
|
|
ln -s -f %{_sysconfdir}/alternatives/pyrcc5 %{buildroot}/%{_bindir}/pyrcc5
|
|
|
|
sed -i 's/The "doc" directory/The "doc" directory of package %{name}-devel/' README
|
|
DOCDIR=%{buildroot}%{_docdir}/%{name}-devel
|
|
mkdir -p $DOCDIR
|
|
cp -pr NEWS doc examples $DOCDIR
|
|
pushd $DOCDIR
|
|
chmod -x `find . -name '*.py*'`
|
|
popd
|
|
|
|
%post devel
|
|
|
|
update-alternatives --install %{_bindir}/pyuic5 pyuic5 %{_bindir}/pyuic5-%{py_ver} 50
|
|
update-alternatives --install %{_bindir}/pylupdate5 pylupdate5 %{_bindir}/pylupdate5-%{py_ver} 50
|
|
update-alternatives --install %{_bindir}/pyrcc5 pyrcc5 %{_bindir}/pyrcc5-%{py_ver} 50
|
|
|
|
%preun devel
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
update-alternatives --remove pyuic5 %{_bindir}/pyuic5-%{py_ver}
|
|
update-alternatives --remove pyrcc5 %{_bindir}/pyrcc5-%{py_ver}
|
|
update-alternatives --remove pylupdate5 %{_bindir}/pylupdate5-%{py_ver}
|
|
fi
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README
|
|
%{python_sitearch}/PyQt5/
|
|
%{python_sitelib}/dbus/mainloop/pyqt5.so
|
|
%dir %{_libqt5_plugindir}/PyQt5/
|
|
%{_libqt5_plugindir}/PyQt5/libpyqt5qmlplugin.so
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%attr(755,root,root) %ghost %{_bindir}/pyuic5
|
|
%attr(755,root,root) %ghost %{_bindir}/pylupdate5
|
|
%attr(755,root,root) %ghost %{_bindir}/pyrcc5
|
|
%{_datadir}/qt5/qsci/
|
|
%{_docdir}/python-qt5-devel
|
|
%{_libqt5_plugindir}/designer/libpyqt5.so
|
|
%ghost %{_sysconfdir}/alternatives/pyuic5
|
|
%ghost %{_sysconfdir}/alternatives/pylupdate5
|
|
%ghost %{_sysconfdir}/alternatives/pyrcc5
|
|
%attr(755,root,root) %{_bindir}/pyuic5-%{py_ver}
|
|
%attr(755,root,root) %{_bindir}/pylupdate5-%{py_ver}
|
|
%attr(755,root,root) %{_bindir}/pyrcc5-%{py_ver}
|
|
|
|
%files utils
|
|
%defattr(-,root,root)
|
|
%{_datadir}/sip/PyQt5
|
|
|
|
%changelog
|