Bug 1294304 - Missing files in PyQt4-webkit cause pyuic4 to generate Python code with broken import
Missing files in PyQt4-webkit cause pyuic4 to generate Python code with broke...
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: PyQt4-webkit (Show other bugs)
epel7
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-26 12:42 EST by Kuan-Yi Li
Modified: 2016-09-30 18:50 EDT (History)
1 user (show)

See Also:
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 18:50:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kuan-Yi Li 2015-12-26 12:42:37 EST
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 08:57:42 EST
This bug must be resolved before working on QGIS startup error.
Comment 2 Kuan-Yi Li 2016-02-21 08:41:48 EST
Anyone seeing this?
Comment 3 Ngo Than 2016-06-29 11:37:56 EDT
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 11:39:46 EDT
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 18:18:35 EDT
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 18:50:35 EDT
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.