python3-qt5 support
This commit is contained in:
parent
1963c0cce5
commit
12d0d5b57c
101
python-qt5.spec
101
python-qt5.spec
@ -1,8 +1,13 @@
|
|||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%global with_python3 1
|
||||||
|
%endif
|
||||||
|
%global with_python2 1
|
||||||
|
|
||||||
Summary: Python bindings for Qt5
|
Summary: Python bindings for Qt5
|
||||||
Name: python-qt5
|
Name: python-qt5
|
||||||
Version: 5.2
|
Version: 5.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
# all BSD, except for GPLv2+ dbus bindings and examples
|
# all BSD, except for GPLv2+ dbus bindings and examples
|
||||||
License: BSD and GPLv2+
|
License: BSD and GPLv2+
|
||||||
@ -30,12 +35,19 @@ BuildRequires: pkgconfig(Qt5Xml) pkgconfig(Qt5XmlPatterns)
|
|||||||
BuildRequires: pkgconfig(Qt5WebKit) pkgconfig(Qt5WebKitWidgets)
|
BuildRequires: pkgconfig(Qt5WebKit) pkgconfig(Qt5WebKitWidgets)
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: sip-devel >= 4.15.4
|
BuildRequires: sip-devel >= 4.15.4
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-sip-devel >= 4.15.0
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
Requires: dbus-python
|
Requires: dbus-python
|
||||||
%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}}
|
%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}}
|
||||||
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
|
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
|
||||||
|
|
||||||
%filter_provides_in %{python_sitearch} %{?_qt5_plugindir}
|
%filter_provides_in %{python_sitearch} %{?_qt5_plugindir}
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%filter_provides_in %{python3_sitearch} %{?_qt5_plugindir}
|
||||||
|
%endif
|
||||||
%filter_setup
|
%filter_setup
|
||||||
|
|
||||||
Provides: PyQt5 = %{version}-%{release}
|
Provides: PyQt5 = %{version}-%{release}
|
||||||
@ -54,6 +66,22 @@ Provides: PyQt5-devel = %{version}-%{release}
|
|||||||
Files needed to build other bindings for C++ classes that inherit from any
|
Files needed to build other bindings for C++ classes that inherit from any
|
||||||
of the Qt5 classes (e.g. KDE or your own).
|
of the Qt5 classes (e.g. KDE or your own).
|
||||||
|
|
||||||
|
%package -n python3-qt5
|
||||||
|
Summary: Python 3 bindings for Qt5
|
||||||
|
%{?_sip_api:Requires: python3-sip-api(%{_sip_api_major}) >= %{_sip_api}}
|
||||||
|
Provides: python3-PyQt5 = %{version}-%{release}
|
||||||
|
%description -n python3-qt5
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package -n python3-qt5-devel
|
||||||
|
Summary: Python 3 bindings for Qt5
|
||||||
|
Requires: python3-qt5%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3-sip-devel
|
||||||
|
Provides: python3-PyQt5-devel = %{version}-%{release}
|
||||||
|
%description -n python3-qt5-devel
|
||||||
|
Files needed to build other bindings for C++ classes that inherit from any
|
||||||
|
of the Qt5 classes (e.g. KDE or your own).
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Developer documentation for %{name}
|
Summary: Developer documentation for %{name}
|
||||||
Provides: PyQt5-doc = %{version}-%{release}
|
Provides: PyQt5-doc = %{version}-%{release}
|
||||||
@ -67,10 +95,17 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%patch50 -p1 -b .qreal_arm
|
%patch50 -p1 -b .qreal_arm
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
PATH=%{_qt5_bindir}:$PATH ; export PATH
|
PATH=%{_qt5_bindir}:$PATH ; export PATH
|
||||||
|
|
||||||
|
# Python 2 build:
|
||||||
|
%if 0%{?with_python2}
|
||||||
%{__python2} configure.py \
|
%{__python2} configure.py \
|
||||||
--assume-shared \
|
--assume-shared \
|
||||||
--confirm-license \
|
--confirm-license \
|
||||||
@ -79,10 +114,34 @@ PATH=%{_qt5_bindir}:$PATH ; export PATH
|
|||||||
--verbose
|
--verbose
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
%endif # with_python2
|
||||||
|
|
||||||
|
# Python 3 build:
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} configure.py \
|
||||||
|
--assume-shared \
|
||||||
|
--confirm-license \
|
||||||
|
--no-timestamp \
|
||||||
|
--qmake=%{_qt5_qmake} \
|
||||||
|
--verbose
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
|
# Python 3 build:
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
make install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot} -C %{py3dir}
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
# Python 2 build:
|
||||||
|
%if 0%{?with_python2}
|
||||||
make install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot}
|
make install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot}
|
||||||
|
%endif # with_python2
|
||||||
|
|
||||||
# remove Python3 code from Python2 directory, fixes FTBFS like PyQt4 (#564633)
|
# remove Python3 code from Python2 directory, fixes FTBFS like PyQt4 (#564633)
|
||||||
rm -rfv %{buildroot}%{python_sitearch}/PyQt5/uic/port_v3/
|
rm -rfv %{buildroot}%{python_sitearch}/PyQt5/uic/port_v3/
|
||||||
@ -90,6 +149,7 @@ rm -rfv %{buildroot}%{python_sitearch}/PyQt5/uic/port_v3/
|
|||||||
rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/
|
rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
%files
|
%files
|
||||||
%doc NEWS README
|
%doc NEWS README
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
@ -127,6 +187,42 @@ rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/
|
|||||||
%{_bindir}/pyrcc5
|
%{_bindir}/pyrcc5
|
||||||
%{_bindir}/pyuic5
|
%{_bindir}/pyuic5
|
||||||
%{_datadir}/sip/PyQt5/
|
%{_datadir}/sip/PyQt5/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-qt5
|
||||||
|
%doc NEWS README
|
||||||
|
%doc LICENSE
|
||||||
|
%dir %{python3_sitearch}/PyQt5/
|
||||||
|
%{python3_sitearch}/PyQt5/__pycache__/
|
||||||
|
%{python3_sitearch}/PyQt5/__init__.py*
|
||||||
|
%{python3_sitearch}/PyQt5/Qt.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtCore.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtDBus.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtDesigner.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtGui.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtHelp.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtMultimedia.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtMultimediaWidgets.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtNetwork.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtOpenGL.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtPrintSupport.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtQml.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtQuick.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtSql.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtSvg.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtTest.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtWebKit.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtWebKitWidgets.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtWidgets.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtX11Extras.so
|
||||||
|
%{python3_sitearch}/PyQt5/QtXmlPatterns.so
|
||||||
|
%{python3_sitearch}/PyQt5/_QOpenGLFunctions_2_0.so
|
||||||
|
%{python3_sitearch}/PyQt5/uic/
|
||||||
|
|
||||||
|
# FIXME/TODO
|
||||||
|
#files -n python3-qt5-devel
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/*
|
%doc doc/*
|
||||||
@ -134,6 +230,9 @@ rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Feb 15 2014 Rex Dieter <rdieter@fedoraproject.org> 5.2-4
|
||||||
|
- python3-qt5 support
|
||||||
|
|
||||||
* Thu Feb 13 2014 Rex Dieter <rdieter@fedoraproject.org> 5.2-3
|
* Thu Feb 13 2014 Rex Dieter <rdieter@fedoraproject.org> 5.2-3
|
||||||
- Provides: PyQt5
|
- Provides: PyQt5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user