from
Meding, Olaf <olaf.meding at bruker-axs dot com>
to
Sylvain Thenault <syt at logilab dot fr>
subject
RE: [Python-projects] Re: FW: PyLint 0.6 bug
date
Sylvain 2005/01/21 09:25
> pylint should work with python >= 2.2. If it doesn't, it's a bug.
I tried a while back and you emailed me some suggestions. I tried them all and it still did not work. So I felt that I wasted my time trying something that did not work.
The problems had to do with installing optik because there was a bug in distutils. Then you made further suggestions, which still failed (I attached 2 emails about the details).
Unless those problems have been fixed since then (and you actually tried this to make sure) I wish you wouldn't claim PyLint works with Python 2.2.1 on Windows.
Anyway, we have a lot of Python 2.2.1 code to port, including utilities such as Qt and about 10 other modules. Once that is done I am looking forward to trying PyLint again.
Olaf
-----Original Message-----
From: Sylvain.Thenault@logilab.fr [mailto:Sylvain.Thenault@logilab.fr]
Sent: Friday, January 21, 2005 9:01 AM
To: Meding, Olaf
Cc: Fabio Zadrozny; python-projects@logilab.org
Subject: Re: [Python-projects] Re: FW: PyLint 0.6 bug
On Friday 21 January à 08:50, Meding, Olaf wrote:
>
> > from qt import *
>
> I can not use PyLint because I am using Python 2.2.1 (we are working on upgrading).
pylint should work with python >= 2.2. If it doesn't, it's a bug.
> However we use Qt extensively. We also use PyChecker, which works great! However, PyChecker has problems with "from qt import *" (lots of bogus warnings). This form of the import statement is bad style anyway because it imports anything. A much cleaner way is to use "import qt". This makes clear what is used from the qt module.
Using both pylint and pychecker is a goog coding habit ! And you're
right that generally using wildcard import is bad since it pollutes your
name space in an uncontrolled fashion.
> Now my question, does PyLint work with Qt? Thanks.
yes, except that it seems to have a litle problem with analyzing of
module using qt on windows platforms, as reported by Fabio Zadrozny in
this thread.
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Sylvain
I wish I could upgrade to a new version of Python, but we are stuck with
Python 2.2.1 for now.
And yes I know the bug is not in your software. So I tried your suggestions
but it did not work (see the 2 errors below).
replace line 24 of optik'setup.py with:
packages = ["optik", "."]
and:
import os
packages = ["optik", os.getcwd()]
Olaf
C:\download\Python\PyLint\optik_files\Optik-1.4.1>python setup.py install
running install
running build
running build_py
Traceback (most recent call last):
File "setup.py", line 24, in ?
packages = ["optik", "."],
File "c:\bn\python22\lib\distutils\core.py", line 138, in setup
File "c:\bn\python22\lib\distutils\dist.py", line 893, in run_commands
File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
File "c:\bn\python22\lib\distutils\command\install.py", line 491, in run
File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
File "c:\bn\python22\lib\distutils\command\build.py", line 107, in run
File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
File "c:\bn\python22\lib\distutils\dist.py", line 912, in run_command
File "c:\bn\python22\lib\distutils\cmd.py", line 112, in ensure_finalized
File "c:\bn\python22\lib\distutils\command\build_py.py", line 57, in
finalize_
options
File "c:\bn\python22\lib\distutils\util.py", line 87, in convert_path
IndexError: string index out of range
C:\download\Python\PyLint\optik_files\Optik-1.4.1>
C:\download\Python\PyLint\optik_files\Optik-1.4.1>
C:\download\Python\PyLint\optik_files\Optik-1.4.1>
C:\download\Python\PyLint\optik_files\Optik-1.4.1>python setup.py install
running install
running build
running build_py
Traceback (most recent call last):
File "setup.py", line 25, in ?
packages = ["optik", os.getcwd()],
File "c:\bn\python22\lib\distutils\core.py", line 138, in setup
File "c:\bn\python22\lib\distutils\dist.py", line 893, in run_commands
File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
File "c:\bn\python22\lib\distutils\command\install.py", line 491, in run
File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
File "c:\bn\python22\lib\distutils\command\build.py", line 107, in run
File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
File "c:\bn\python22\lib\distutils\dist.py", line 912, in run_command
File "c:\bn\python22\lib\distutils\cmd.py", line 112, in ensure_finalized
File "c:\bn\python22\lib\distutils\command\build_py.py", line 57, in
finalize_
options
File "c:\bn\python22\lib\distutils\util.py", line 87, in convert_path
IndexError: string index out of range
C:\download\Python\PyLint\optik_files\Optik-1.4.1>
-----Original Message-----
From: Sylvain.Thenault@logilab.fr [mailto:Sylvain.Thenault@logilab.fr]
Sent: Friday, August 27, 2004 2:12 AM
To: Meding, Olaf
Cc: python-projects@lists.logilab.org
Subject: Re: [Python-projects] How To Install PyLint
On Thursday 26 August à 12:44, Meding, Olaf wrote:
> Sylvain
>
> > ... you have to install the optik module ...
>
> Okay, downloaded the Optik 1.4.1 code but got the error below. Seems like
> PyLint really requires Python 2.3 or higher. Or did I use the wrong
version
> of Optik perhaps? Not sure what to do now.
This has nothing to do with pylint... This is a bug in distutils, fixed
in more recent versions of python. Any chance for you to go with 2.2.3
or higher ?
> C:\download\Python\PyLint\optik_files\Optik-1.4.1>python setup.py install
> running install
> running build
> running build_py
> Traceback (most recent call last):
> File "setup.py", line 24, in ?
> packages = ["optik", ""],
> File "c:\bn\python22\lib\distutils\core.py", line 138, in setup
> File "c:\bn\python22\lib\distutils\dist.py", line 893, in run_commands
> File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
> File "c:\bn\python22\lib\distutils\command\install.py", line 491, in run
> File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
> File "c:\bn\python22\lib\distutils\dist.py", line 913, in run_command
> File "c:\bn\python22\lib\distutils\command\build.py", line 107, in run
> File "c:\bn\python22\lib\distutils\cmd.py", line 330, in run_command
> File "c:\bn\python22\lib\distutils\dist.py", line 912, in run_command
> File "c:\bn\python22\lib\distutils\cmd.py", line 112, in
ensure_finalized
> File "c:\bn\python22\lib\distutils\command\build_py.py", line 57, in
> finalize_
> options
> File "c:\bn\python22\lib\distutils\util.py", line 87, in convert_path
> IndexError: string index out of range
if you can't get a fixed distutils version, you should try to replace
line 24 of optik'setup.py with
packages = ["optik", "."]
or
packages = ["optik", os.getcwd()]
with "import os" upper in the file
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
On Friday 27 August à 09:02, Meding, Olaf wrote:
> Sylvain
>
> I wish I could upgrade to a new version of Python, but we are stuck with
> Python 2.2.1 for now.
>
> And yes I know the bug is not in your software. So I tried your suggestions
> but it did not work (see the 2 errors below).
grrrr. Ok, here are some ideas, just pick one:
- install python2.3 to run pylint
- install optik manually "mv Optik-1.5a1/lib/ $PYTHONHOME/site-packages"
(just replace $PYTHONHOME with your python installation directory)
- I also think that replacing :
package_dir = { "optik" : "lib", "": os.curdir },
packages = ["optik", ""],
by
package_dir = { "optik" : "lib"},
packages = ["optik"],
should do the trick (you won't have the optparse module installed
used to give python 2.3 compatibility, but pylint is handling this so
it's not a problem)
- install a newer version of the distutils package, as the one provided
with python 2.2.3 for instance
- <insert some new idea here>
hope that you'll finally have pylint running ;)
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
