Bug 1294304 - Missing files in PyQt4-webkit cause pyuic4 to generate Python code with broken import
Summary: Missing files in PyQt4-webkit cause pyuic4 to generate Python code with broke...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: PyQt4-webkit
Version: epel7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-26 17:42 UTC by Kuan-Yi Li
Modified: 2016-09-30 22:50 UTC (History)
1 user (show)

Fixed In Version: PyQt4-webkit-4.10.1-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-30 22:50:35 UTC


Attachments (Terms of Use)

Description Kuan-Yi Li 2015-12-26 17:42:37 UTC
Description of problem:
In RHEL/CentOS 7, unlike in RHEL/CentOS 6, certain files in widget-plugins are explicitly removed from official PyQt4 package.

*** excerpt from official PyQt4.spec ***

# qscintilla
%if ! 0%{?qscintilla}
  rm -rf %{buildroot}%{python3_sitearch}/PyQt4/uic/widget-plugins/qscintilla* \
         %{buildroot}%{python_sitearch}/PyQt4/uic/widget-plugins/qscintilla*
%endif

# webkit
%if ! 0%{?webkit}
  rm -rf %{buildroot}%{python3_sitearch}/PyQt4/uic/widget-plugins/qtwebkit* \
         %{buildroot}%{python_sitearch}/PyQt4/uic/widget-plugins/qtwebkit*
%endif

*** end of excerpt ***

Files like qtwebkit.py in widget-plugins should be added back when installing PyQt4-webkit -- otherwise pyuic4 will generate code with broken import while processing .ui files that use QtWebKit.

As other widget-plugins are placed in official PyQt4 package, I would personally suggest following changes:
1. Put qtwebkit.py into PyQt4-webkit package
2. Make PyQt4-webkit-devel requires PyQt4-webkit


Version-Release number of selected component (if applicable):
4.10.1-1


How reproducible:
Always


Steps to Reproduce:
1. Install PyQt4, PyQt4-devel, PyQt4-webkit, PyQt4-webkit-devel
2. cd /tmp
3. cp -r /usr/share/doc/PyQt4-devel-4.10.1/examples/webkit/simpleselector ./
4. cd simpleselector
5. pyuic4 window.ui --output=ui_window.py
6. python simpleselector.py


Actual results:
Program exits with error.
Traceback (most recent call last):
  File "simpleselector.py", line 51, in <module>
    from ui_window import Ui_Window
  File "/tmp/simpleselector/ui_window.py", line 63, in <module>
    from QtWebKit.QWebView import QWebView
ImportError: No module named QtWebKit.QWebView


Expected results:
A window should open without error like running
python /usr/share/doc/PyQt4-devel-4.10.1/examples/webkit/simpleselector/simpleselector.py
If everything works correctly, generated Python code (ui_window.py) should end with "from PyQt4 import QtWebKit" instead of "from QtWebKit.QWebView import QWebView".


Additional info:
Same problem exists in package "qscintilla".

Comment 1 Kuan-Yi Li 2016-01-07 13:57:42 UTC
This bug must be resolved before working on QGIS startup error.

Comment 2 Kuan-Yi Li 2016-02-21 13:41:48 UTC
Anyone seeing this?

Comment 3 Than Ngo 2016-06-29 15:37:56 UTC
it's fixed in 4.10.1-2. I will push it to fedora update testing today. Please test it and give the karma.

Thanks for you report.

Comment 4 Fedora Update System 2016-06-29 15:39:46 UTC
PyQt4-webkit-4.10.1-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b07a6cd1d9

Comment 5 Fedora Update System 2016-06-30 22:18:35 UTC
PyQt4-webkit-4.10.1-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-b07a6cd1d9

Comment 6 Fedora Update System 2016-09-30 22:50:35 UTC
PyQt4-webkit-4.10.1-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.