Bug 1294304

Summary: Missing files in PyQt4-webkit cause pyuic4 to generate Python code with broken import
Product: [Fedora] Fedora EPEL Reporter: Kuan-Yi Li <kyli.tw>
Component: PyQt4-webkitAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: PyQt4-webkit-4.10.1-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-30 22:50:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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* \

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

*** 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):

How reproducible:

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.