Issue2262
Created on 2015-01-23.12:59:17 by alex1ta, last changed 2015-02-03.00:57:24 by zyasoft.
File name |
Uploaded |
Description |
Edit |
Remove |
pylint.pth
|
alex1ta,
2015-01-23.12:59:16
|
Short 5-line python path file to help Jython find the Lib. |
|
|
msg9445 (view) |
Author: (alex1ta) |
Date: 2015-01-23.12:59:15 |
|
Running Windows 7 SP1 and Java 1.8.0_25. Download Jython 2.7b3 Standalone: http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7-b3/jython-standalone-2.7-b3.jar
Choose a directory to keep the JAR, e.g. C:\Users\USER\projects and put the JAR inside.
In the same directory, create structure Lib\site-packages and inside site-packages, extract the contents of pylint, astroid, logilab\common and six.py from PyPI (as detailed on pylint.org). In site-packages, add pylint.pth as attached.
Using a sample project, e.g. https://github.com/andymccurdy/redis-py.git, run Pylint as follows:
`java -jar jython-standalone-2.7-b3.jar -m pylint redis-py/redis`
Results should show messages like:
F: 3, 0: Unable to import 'datetime' (import-error)
F: 5, 0: Unable to import 'warnings' (import-error)
F: 7, 0: Unable to import 'threading' (import-error)
F: 2, 0: Unable to import 'distutils.version' (import-error)
F: 4, 0: Unable to import 'select' (import-error)
F: 5, 0: Unable to import 'os' (import-error)
F: 6, 0: Unable to import 'socket' (import-error)
F: 8, 0: Unable to import 'threading' (import-error)
F: 9, 0: Unable to import 'warnings' (import-error)
F: 34, 4: Unable to import 'hiredis' (import-error)
F: 1, 0: Unable to import 'threading' (import-error)
F: 3, 0: Unable to import 'uuid' (import-error)
F: 1, 0: Unable to import 'os' (import-error)
F: 2, 0: Unable to import 'random' (import-error)
F: 3, 0: Unable to import 'weakref' (import-error)
F: 1, 0: Unable to import 'contextlib' (import-error)
F: 6, 4: Unable to import 'urlparse' (import-error)
F: 8, 4: Unable to import 'string' (import-error)
F: 9, 4: Unable to import 'Queue' (import-error)
F: 13, 8: Unable to import 'StringIO' (import-error)
F: 41, 4: Unable to import 'urllib.parse' (import-error)
F: 42, 4: Unable to import 'io' (import-error)
F: 43, 4: Unable to import 'string' (import-error)
F: 44, 4: Unable to import 'queue' (import-error)
F: 68, 4: Unable to import 'Queue' (import-error)
F: 72, 8: Unable to import 'Queue' (import-error)
Most of these should be able to be imported when running the Jython shell (like os, random, ...):
java -jar jython-standalone-2.7-b3.jar
This does not occur when Jython is natively installed on your machine, or if Pylint runs on a Python installation. Also, 2.7b3 is the only standalone Jython JAR that will run Pylint.
|
msg9479 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-03.00:57:24 |
|
Underlying problem is most likely #2143
|
|
Date |
User |
Action |
Args |
2015-02-03 00:57:24 | zyasoft | set | priority: low nosy:
+ zyasoft messages:
+ msg9479 |
2015-01-23 12:59:17 | alex1ta | create | |
|