Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 409348 Details for
Bug 586196
RFE: add python 3 support to PyQt4
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Work-in-progress patch to devel/PyQt4.spec to add python3 subpackages
add-python3-to-PyQt4.patch (text/plain), 5.51 KB, created by
Dave Malcolm
on 2010-04-27 03:48:54 UTC
(
hide
)
Description:
Work-in-progress patch to devel/PyQt4.spec to add python3 subpackages
Filename:
MIME Type:
Creator:
Dave Malcolm
Created:
2010-04-27 03:48:54 UTC
Size:
5.51 KB
patch
obsolete
>? .build-4.7.3-2.fc14.log >? PyQt-x11-gpl-4.7.3 >? PyQt4-4.7.3-2.fc14.src.rpm >? python3-PyQt4-4.7.3-2.fc14 >Index: PyQt4.spec >=================================================================== >RCS file: /cvs/pkgs/rpms/PyQt4/devel/PyQt4.spec,v >retrieving revision 1.48 >diff -u -p -r1.48 PyQt4.spec >--- PyQt4.spec 17 Apr 2010 20:45:48 -0000 1.48 >+++ PyQt4.spec 27 Apr 2010 03:40:56 -0000 >@@ -1,10 +1,11 @@ >+%global with_python3 1 > > # Fedora review: http://bugzilla.redhat.com/190189 > > Summary: Python bindings for Qt4 > Name: PyQt4 > Version: 4.7.3 >-Release: 1%{?dist} >+Release: 2%{?dist} > > # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt) > License: GPLv3 or GPLv2 with exceptions >@@ -39,6 +40,11 @@ BuildRequires: python-devel > > BuildRequires: sip-devel >= 4.10.2 > >+%if 0%{?with_python3} >+BuildRequires: python3-devel >+BuildRequires: python3-sip-devel >= 4.10.2 >+%endif # with_python3 >+ > Requires: dbus-python > %{?_qt4_version:Requires: qt4 >= %{_qt4_version}} > %{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}} >@@ -56,6 +62,37 @@ Requires: sip-devel > Files needed to build other bindings for C++ classes that inherit from any > of the Qt4 classes (e.g. KDE or your own). > >+%if 0%{?with_python3} >+ >+# The bindings are imported as "PyQt4", hence it's reasonable to name the >+# Python 3 subpackage "python3-PyQt4", despite the apparent tautology >+ >+%package -n python3-PyQt4 >+Summary: Python 3 bindings for Qt4 >+Group: Development/Languages >+ >+# The dbus Python bindings have not yet been ported to Python 3: >+# Requires: dbus-python >+ >+%{?_qt4_version:Requires: qt4 >= %{_qt4_version}} >+%{?_sip_api:Requires: python3-sip-api(%{_sip_api_major}) >= %{_sip_api}} >+ >+%description -n python3-PyQt4 >+These are Python 3 bindings for Qt4. >+ >+%package -n python3-PyQt4-devel >+Summary: Python 3 bindings for Qt4 >+Group: Development/Languages >+Requires: %{name} = %{version}-%{release} >+Requires: python3-PyQt4-devel >+Requires: python3-sip-devel >+ >+%description -n python3-PyQt4-devel >+Files needed to build other Python 3 bindings for C++ classes that inherit >+from any of the Qt4 classes (e.g. KDE or your own). >+ >+%endif # with_python3 >+ > > %prep > %setup -q -n PyQt-x11-gpl-%{version}%{?snap:-snapshot-%{snap}} >@@ -71,12 +108,17 @@ of the Qt4 classes (e.g. KDE or your own > find examples/ -name "*.py" | xargs chmod a-x > chmod a+rx pyuic/uic/pyuic.py > >+%if 0%{?with_python3} >+rm -rf %{py3dir} >+cp -a . %{py3dir} >+%endif # with_python3 > > %build > > QT4DIR=%{_qt4_prefix} > PATH=%{_qt4_bindir}:$PATH ; export PATH > >+# Python 2 build: > %{__python} configure.py \ > --confirm-license \ > --qmake=%{_qt4_qmake} \ >@@ -84,25 +126,56 @@ PATH=%{_qt4_bindir}:$PATH ; export PATH > > make %{?_smp_mflags} > >+# Python 3 build: >+%if 0%{?with_python3} >+pushd %{py3dir} >+%{__python3} configure.py \ >+ --confirm-license \ >+ --qmake=%{_qt4_qmake} \ >+ --verbose >+ >+make %{?_smp_mflags} >+popd >+%endif # with_python3 >+ > > %install > rm -rf %{buildroot} > >-make install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot} >+InstallPyQt4() { >+ PySiteArch=$1 >+ >+ make install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot} >+ >+ # fix/remove rpaths >+ chrpath --list %{buildroot}$PySiteArch/PyQt4/QtCore.so >+ chrpath --delete %{buildroot}$PySiteArch/PyQt4/QtCore.so > >-# fix/remove rpaths >-chrpath --list %{buildroot}%{python_sitearch}/PyQt4/QtCore.so >-chrpath --delete %{buildroot}%{python_sitearch}/PyQt4/QtCore.so >+ chrpath --list %{buildroot}$PySiteArch/PyQt4/QtGui.so >+ chrpath --delete %{buildroot}$PySiteArch/PyQt4/QtGui.so > >-chrpath --list %{buildroot}%{python_sitearch}/PyQt4/QtGui.so >-chrpath --delete %{buildroot}%{python_sitearch}/PyQt4/QtGui.so >+ chrpath --list %{buildroot}$PySiteArch/PyQt4/QtDesigner.so >+ chrpath --delete %{buildroot}$PySiteArch/PyQt4/QtDesigner.so >+} > >-chrpath --list %{buildroot}%{python_sitearch}/PyQt4/QtDesigner.so >-chrpath --delete %{buildroot}%{python_sitearch}/PyQt4/QtDesigner.so > >+ >+# Install Python 3 first, and move aside any executables, to avoid clobbering >+# the Python 2 installation: >+%if 0%{?with_python3} >+pushd %{py3dir} >+InstallPyQt4 %{python3_sitearch} >+popd >+%endif # with_python3 >+ >+InstallPyQt4 %{python_sitearch} >+ >+# DBus bindings only work for Python 2 so far: > chrpath --list %{buildroot}%{python_sitelib}/dbus/mainloop/qt.so > chrpath --delete %{buildroot}%{python_sitelib}/dbus/mainloop/qt.so > >+ >+ > # HACK: fix multilb conflict, http://bugzilla.redhat.com/509415 > rm -fv %{buildroot}%{_bindir}/pyuic4 > mv %{buildroot}%{python_sitearch}/PyQt4/uic/pyuic.py \ >@@ -119,6 +192,10 @@ rm -rf %{buildroot}%{python_sitearch}/Py > test -f %{buildroot}%{python_sitearch}/PyQt4/phonon.so > test -d %{buildroot}%{_datadir}/sip/PyQt4/phonon > >+%if 0%{?with_python3} >+test -f %{buildroot}%{python3_sitearch}/PyQt4/phonon.so >+test -d %{buildroot}%{_datadir}/python3-sip/PyQt4/phonon >+%endif # with_python3 > > %clean > rm -rf %{buildroot} >@@ -149,8 +226,30 @@ rm -rf %{buildroot} > %{_qt4_prefix}/qsci/api/python/PyQt4.api > %endif > >+%files -n python3-PyQt4 >+%defattr(-,root,root,-) >+%doc NEWS README >+%doc OPENSOURCE-NOTICE.TXT >+%doc LICENSE.GPL2 GPL_EXCEPTION*.TXT >+%doc LICENSE.GPL3 >+%{python3_sitearch}/PyQt4/ >+%exclude %{python3_sitearch}/PyQt4/uic/pyuic.py* >+ >+%files -n python3-PyQt4-devel >+%defattr(-,root,root,-) >+%doc doc/* >+%doc examples/ >+%{python3_sitearch}/PyQt4/uic/pyuic.py* >+%{_datadir}/python3-sip/PyQt4/ >+%if 0%{?fedora} >+%{_qt4_prefix}/qsci/api/python/PyQt4.api >+%endif >+ > > %changelog >+* Mon Apr 26 2010 David Malcolm <dmalcolm@redhat.com> - 4.7.3-2 >+- add python 3 subpackages >+ > * Sat Apr 17 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.7.3-1 > - PyQt-x11-gpl-4.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 586196
:
409348
|
409509