Opened 6 years ago

Closed 6 years ago

#56178 closed defect (fixed)

py27-pyface @5.1.0_0+pyqt4: missing py-pygments as a dependency?

Reported by: MoogHub Owned by: jjstickel (Jonathan Stickel)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: haspatch Cc:
Port: py-pyface

Description

Hi,

I've encountered the following error with "py27-pyface @5.1.0_0+pyqt4":

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mayavi/core/common.py", line 21, in <module>
    from pyface import api as pyface
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/api.py", line 34, in <module>
    from .python_editor import PythonEditor
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/python_editor.py", line 21, in <module>
    PythonEditor = toolkit_object('python_editor:PythonEditor')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/toolkit.py", line 129, in toolkit_object
    __import__(be_mname)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/ui/qt4/python_editor.py", line 27, in <module>
    from pyface.ui.qt4.code_editor.code_widget import AdvancedCodeWidget
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/ui/qt4/code_editor/code_widget.py", line 23, in <module>
    from .pygments_highlighter import PygmentsHighlighter
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyface/ui/qt4/code_editor/pygments_highlighter.py", line 14, in <module>
    from pygments.lexer import RegexLexer, _TokenType, Text, Error
ImportError: No module named pygments.lexer

Could it be that there's a missing dependency in "py-pyface"?

The following patch to the port file fixed that bug for me:

--- Portfile.orig	2018-03-29 11:46:10.000000000 +0200
+++ Portfile	2018-03-29 11:49:53.000000000 +0200
@@ -36,6 +36,7 @@
 
     variant pyqt4 description "Qt backend using PyQt4" {
         depends_lib-append  port:py${python.version}-pyqt4
+        depends_lib-append  port:py${python.version}-pygments
     }
 
     variant pyside description "Qt backend using PySide" {

Bw, D.

P.s.: could somebody please remove #56176. Not sure if it's intended that ticket owners cannot update their tickets or if I'm just blind.

Attachments (1)

patch-pygents-dep-fix.diff (373 bytes) - added by MoogHub 6 years ago.
Patch: Portfile (py-pyface).

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by MoogHub

Attachment: patch-pygents-dep-fix.diff added

Patch: Portfile (py-pyface).

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Cc: jjstickel@… removed
Keywords: highsierra removed
Owner: set to jjstickel
Status: newassigned

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Summary: py27-pyface @5.1.0_0+pyqt4: missing py-pygemnts as a dependency?py27-pyface @5.1.0_0+pyqt4: missing py-pygments as a dependency?

comment:3 Changed 6 years ago by jjstickel (Jonathan Stickel)

Adding this dependency looks fine to me.

comment:4 Changed 6 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

In 2a1866c4b0c15ea4868d05f8a5e7595f38473eb2/macports-ports (master):

py-pyface: Add dependency on py-pygments for pyqt4 variant

Closes: #56178

Note: See TracTickets for help on using tickets.