2010-11-30 57 views
2

Nous avons une tonne de scripts Jython pour notre automatisation du déploiement; J'aimerais que Pylint fasse partie de notre pipeline de construction.Démarrer avec Pylint pour Jython (jython2.5.1)

J'ai téléchargé et installé logilab-astng, logilab-commun et pylint d'ici: http://www.logilab.org/857

J'ai installé les bibliothèques logilab avec succès en utilisant:

jython setup.py install

Cependant, lorsque je tente d'installer pylint je reçois la sortie suivante:

C:\temp\pylint-0.22.0.tar.gz\pylint-0.22.0>jython setup.py install 
running install 
running build 
running build_py 
package init file '.\test\__init__.py' not found (or not a regular file) 
package init file '.\test\__init__.py' not found (or not a regular file) 
running build_scripts 
creating build\scripts-2.5 
copying and adjusting bin\pylint -> build\scripts-2.5 
copying and adjusting bin\pylint-gui -> build\scripts-2.5 
copying and adjusting bin\symilar -> build\scripts-2.5 
copying and adjusting bin\epylint -> build\scripts-2.5 
copying and adjusting bin\pyreverse -> build\scripts-2.5 
changing mode of build\scripts-2.5\pylint from 666 to 777 
changing mode of build\scripts-2.5\pylint-gui from 666 to 777 
changing mode of build\scripts-2.5\symilar from 666 to 777 
changing mode of build\scripts-2.5\epylint from 666 to 777 
changing mode of build\scripts-2.5\pyreverse from 666 to 777 
running install_lib 
byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py to func_continue_not_in_l 
oop$py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py", line 8 

^
SyntaxError: 'continue' not properly in loop 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_nonascii_noencoding.py to func_nonascii_noencodin 
g$py.class 
SyntaxError: ("Non-ASCII character in file 'C:\\jython2.5.1\\Lib\\site-packages\\pylint\\test\\input\\func_nonascii_noen 
coding.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details",) 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_outside_func.py to func_return_outside_fun 
c$py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_outside_func.py", line 3 

^
SyntaxError: 'return' outside function 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix.py to func_return_yield_mix$py.c 
lass 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix.py", line 8 

^
SyntaxError: 'return' with argument inside generator 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix2.py to func_return_yield_mix2$py 
.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix2.py", line 8 

^
SyntaxError: 'return' with argument inside generator 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_syntax_error.py to func_syntax_error$py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_syntax_error.py", line 1 
    def toto 
     ^
SyntaxError: mismatched input '\n' expecting LPAREN 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_unknown_encoding.py to func_unknown_encoding$py.c 
lass 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_unknown_encoding.py", line 1 

^
SyntaxError: Unknown encoding: IBO-8859-1 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_w0705.py to func_w0705$py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_w0705.py", line 29 

^
SyntaxError: default 'except:' must be last 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_wrong_encoding.py to func_wrong_encoding$py.class 

SyntaxError: ("Illegal character in file 'C:\\jython2.5.1\\Lib\\site-packages\\pylint\\test\\input\\func_wrong_encoding. 
py' for encoding 'UTF-8'",) 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_yield_outside_func.py to func_yield_outside_func$ 
py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_yield_outside_func.py", line 3 

^
SyntaxError: 'yield' outside function 

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func___future___import_not_first_stmt.py to func___fut 
ure___import_not_first_stmt$py.class 
    File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func___future___import_not_first_stmt.py", line 4 

^
SyntaxError: from __future__ imports must occur at the beginning of the file 

running install_scripts 
copying build\scripts-2.5\epylint -> C:\jython2.5.1\bin 
copying build\scripts-2.5\pylint -> C:\jython2.5.1\bin 
copying build\scripts-2.5\pylint-gui -> C:\jython2.5.1\bin 
copying build\scripts-2.5\pyreverse -> C:\jython2.5.1\bin 
copying build\scripts-2.5\symilar -> C:\jython2.5.1\bin 
changing mode of C:\jython2.5.1\bin\epylint to 777 
changing mode of C:\jython2.5.1\bin\pylint to 777 
changing mode of C:\jython2.5.1\bin\pylint-gui to 777 
changing mode of C:\jython2.5.1\bin\pyreverse to 777 
changing mode of C:\jython2.5.1\bin\symilar to 777 
running install_egg_info 
Removing C:\jython2.5.1\Lib\site-packages\pylint-0.22.0-py2.5.egg-info 
Writing C:\jython2.5.1\Lib\site-packages\pylint-0.22.0-py2.5.egg-info 

Des idées?

Répondre

1

Vous ne devriez pas essayer de compiler les fichiers de test: certains d'entre eux sont cassés à dessein (ce sont des entrées de test pour pylint).

+0

Ah gotcha! thx mec. –

+4

Alors, quelle était la solution ici? Comment pouvez-vous exécuter "setup.py install" sans compiler les fichiers de test? –