我们有大量的Jython脚本用于我们的部署自动化;我希望Pylint成为我们构建管道的一部分。
我从这里下载并安装了logilab-astng,logilab-common和pylint:http://www.logilab.org/857
我使用以下方法成功安装了logilab库:
jython setup.py install
但是,当我尝试安装pylint时,我得到以下输出:
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
有什么想法吗?
答案 0 :(得分:1)
你不应该尝试编译测试文件:其中一些是故意破坏的(它们是pylint的测试输入)。