[MacPorts] #54007: global @6.5.6: Provided /opt/local/share/gtags/script/pygments_parser.py has shebang that points to Apple's Python and this results in failure

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[MacPorts] #54007: global @6.5.6: Provided /opt/local/share/gtags/script/pygments_parser.py has shebang that points to Apple's Python and this results in failure

MacPorts
#54007: global @6.5.6: Provided /opt/local/share/gtags/script/pygments_parser.py
has shebang that points to Apple's Python and this results in failure
----------------------+--------------------
 Reporter:  iqgrande  |      Owner:
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:  2.4.1
 Keywords:  global    |       Port:  global
----------------------+--------------------
 Greetings:

 I recently installed GNU Global via MacPorts and when I tried to run
 `gtags` on a source tree that contains Fortran, Python, TeX, and C, I
 received the following error(s). When I look at
 `/opt/local/share/gtags/script/pygments_parser.py` I notice it's shebang
 is `#!/usr/bin/python`. I changed this to `/opt/local/bin/python` and then
 things worked. So, would you be able to assist me with this? If there are
 some other environment variables/setup that I need to do to better enable
 things, then please let me know. If there are no better ways to set things
 up, then I suspect either a patch would be made to alter the shebang to
 something more practical like `#!/usr/bin/env python` so the user can
 ensure that `$PATH`-preferred Python has the appropriate Pygments library
 installed, or `gtags` would need to be modified to prepend `python` to its
 invocation of `/opt/local/share/gtags/script/pygments_parser.py`. Thank
 you for any insight you can provide into this.

 {{{
 $ export GTAGSCONF=/opt/local/share/gtags/gtags.conf
 $ export GTAGSLABEL=pygments
 $ gtags -v --explain
 [Thu Apr 20 17:26:30 MDT 2017] Gtags started.
  Using configuration file '/opt/local/share/gtags/gtags.conf'.
  Using configuration label 'pygments'.
  Using plug-in parser.
 [Thu Apr 20 17:26:30 MDT 2017] Creating 'GTAGS' and 'GRTAGS'.
  - Directory '.git/' is skipped because the name begins with a dot.
  - File '.gitignore' is skipped because the name begins with a dot.
  [1] extracting tags of Atmos/src/Atmos_ames_mod_source.f
  - File 'foo.f' is handled as follows:
         suffix:   |.f|
         language: |Fortran|
         parser:   |parser|
         library:  |/opt/local/lib/gtags/pygments-parser.so|
 Traceback (most recent call last):
   File "/opt/local/share/gtags/script/pygments_parser.py", line 27, in
 <module>
     import pygments.lexers
 ImportError: No module named pygments.lexers
 gtags: unexpected EOF.
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54007>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54007: global @6.5.6: Provided /opt/local/share/gtags/script/pygments_parser.py has shebang that points to Apple's Python and this results in failure

MacPorts
#54007: global @6.5.6: Provided /opt/local/share/gtags/script/pygments_parser.py
has shebang that points to Apple's Python and this results in failure
-----------------------+------------------------
  Reporter:  iqgrande  |      Owner:  seanfarley
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.1
Resolution:            |   Keywords:
      Port:  global    |
-----------------------+------------------------
Changes (by mf2k):

 * status:  new => assigned
 * keywords:  global =>
 * cc: sean@… (removed)
 * owner:   => seanfarley


--
Ticket URL: <https://trac.macports.org/ticket/54007#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...