Начало работы с Pylint для Jython (jython2.5.1) - PullRequest
3 голосов
/ 30 ноября 2010

У нас есть тонна 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

Есть идеи?

1 Ответ

1 голос
/ 31 марта 2011

вам не следует пытаться скомпилировать тестовые файлы: некоторые из них специально разбиты (они являются тестовыми входами для pylint).

...