make mapfiles fails with ImportError: No module named pygments.formatters.bbcode

Create issue
Issue #992 duplicate
Former user created an issue

I'm writing my own lexer (for a faq script), and when trying to run make mapfiles, I get this.

pball@piglet:~/src/hg/pygments-main 
    $ make mapfiles
(cd pygments/lexers; python _mapping.py)
pygments.lexers.agile
pygments.lexers.asm
pygments.lexers.compiled
pygments.lexers.dalvik
pygments.lexers.dotnet
pygments.lexers.faq
pygments.lexers.foxpro
pygments.lexers.functional
pygments.lexers.graph
pygments.lexers.hdl
pygments.lexers.inferno
pygments.lexers.jvm
pygments.lexers.math
pygments.lexers.other
pygments.lexers.parsers
pygments.lexers.qbasic
pygments.lexers.rdf
pygments.lexers.shell
pygments.lexers.special
pygments.lexers.sql
pygments.lexers.templates
pygments.lexers.text
pygments.lexers.web
(cd pygments/formatters; python _mapping.py)
Traceback (most recent call last):
  File "_mapping.py", line 19, in <module>
    from pygments.formatters.bbcode import BBCodeFormatter
ImportError: No module named pygments.formatters.bbcode
make: *** [mapfiles] Error 1

 $ echo $PYTHONPATH
$HOME/src/hg/pygments-main/pygments

so pygments is on the PYTHONPATH. Am I overlooking something silly? thx.

Comments (2)

  1. Tim Hatch

    I think it's the $HOME -- you need to expand that. Try something as simple as PYTHONPATH=$PWD make mapfiles and it should work. There's an issue open to make the formatters part work more like the lexers part, but the PR was too complex.

  2. Log in to comment