Bug 31416

Summary: ImportError: cannot import name _noncomma (from pyparsing)
Product: Autoimports (Sisyphus) Reporter: Ivan Zakharyaschev <imz>
Component: dot2texAssignee: viy <viy>
Status: CLOSED FIXED QA Contact: viy <viy>
Severity: critical    
Priority: P3 CC: george, mike
Version: не указана   
Hardware: all   
OS: Linux   
Bug Depends on:    
Bug Blocks: 31414    

Description Ivan Zakharyaschev 2015-10-29 17:14:35 MSK
dot2tex-2.8.7-alt1_11
python-module-pyparsing-2.0.3-alt1

dot2tex fails to run because of an unsatisfied import from python-module-pyparsing .

(Of course, this problem could be prevented if RPM's automatic reqs/provs for python modules were more fine-grained: listing all the individual imported and exported names;  but this is heavy, it's like set-versions for C libraries. I don't know whether some minimal required versions of python-modules can be automatically extracted from the code. Can't this be checked when re-compiling the broken package. E.g., when re-compiling dot2tex in Sisyphus, shouldn't this error be detected?)

For example, when doing "make" in https://github.com/rominf/latex-g7-32 (which calls dot2tex; mentioned in https://bugzilla.altlinux.org/show_bug.cgi?id=31414 ), the following errors happen:

make -k 
mkdir -p tex/inc/dia
dia -e tex/inc/dia/rpz-idef0.eps -t eps-pango graphics/dia/rpz-idef0.dia
graphics/dia/rpz-idef0.dia --> tex/inc/dia/rpz-idef0.eps
epstopdf --outfile tex/inc/dia/rpz-idef0.pdf tex/inc/dia/rpz-idef0.eps
mkdir -p tex/inc/dot
dot2tex -f pgf --crop --docpreamble "\usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english, russian]{babel}" --preproc graphics/dot/cow2.dot | dot2tex -f pgf --crop --docpreamble "\usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english, russian]{babel}"  > tex/inc/dot/cow2.tex
Traceback (most recent call last):
  File "/usr/bin/dot2tex", line 2, in <module>
    from dot2tex.dot2tex import main
  File "/usr/lib/python2.7/site-packages/dot2tex/__init__.py", line 36, in <module>
    import dot2tex as d2t
  File "/usr/lib/python2.7/site-packages/dot2tex/dot2tex.py", line 47, in <module>
    import dotparsing
  File "/usr/lib/python2.7/site-packages/dot2tex/dotparsing.py", line 26, in <module>
    from pyparsing import  (Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
ImportError: cannot import name _noncomma
Traceback (most recent call last):
  File "/usr/bin/dot2tex", line 2, in <module>
    from dot2tex.dot2tex import main
  File "/usr/lib/python2.7/site-packages/dot2tex/__init__.py", line 36, in <module>
    import dot2tex as d2t
  File "/usr/lib/python2.7/site-packages/dot2tex/dot2tex.py", line 47, in <module>
    import dotparsing
  File "/usr/lib/python2.7/site-packages/dot2tex/dotparsing.py", line 26, in <module>
    from pyparsing import  (Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
ImportError: cannot import name _noncomma
make: *** [tex/inc/dot/cow2.tex] Error 1
make: Target `all' not remade because of errors.
rm tex/inc/dot/cow2.tex tex/inc/dia/rpz-idef0.eps
Comment 1 Michael Shigorin 2015-10-30 11:04:52 MSK
О, а вот и π-баг с символичными фигурантами :)
Comment 3 Ivan Zakharyaschev 2015-10-31 14:33:43 MSK
A quick workaround: install python-module-pyparsing=1.5.7-alt1 from t7.
Comment 4 viy 2017-11-04 13:36:48 MSK
dot2tex перемещен в autoimports, в текущей версии проблема решена
Comment 5 viy 2017-11-04 13:37:23 MSK
dot2tex-2.8.7-alt1_15.src.rpm