[Python-projects] Fwd: Re: Pylint, virtualenv & init-hook

Tom Crawley tcrawley at beacon-cs.com
Wed Feb 18 23:28:23 CET 2009


Hi,

This was rejected from the mail address Sylvain had in his email.

Thank you for the prompt reply.

I checked the logilab-astng and I cannot see any mention of egg support ?

Are there any plans to add it ?

Thanks

Tom

On Wednesday 18 February 2009 15:24, Sylvain Thénault wrote:
> Le Wednesday 18 February 2009 17:54:18 Tom Crawley, vous avez écrit :
> > Hi,
> 
> hi,
> 
> > I have tried to use pylint with virtualenv in a virtualenvwrapper.
> >
> > pylint does not pickup the virtualenv entries in sys.path. It alway uses
> > the system sys.path and does not seem to recognise eggs or egg links as
> > path entries.
> >
> > I wrote a small init-hook which appends the eggs etc to the sys.path and
> > used it to invoke pylint.
> >
> > pylint --init-hook='import sys;print sys.path;import
> > virtualenvpath;virtualenvpath.build_path();print sys.path' dbhelper.py
> >
> > running the command with this hook confirms that the eggs in the virtualenv
> > environment site-packages directory are added
> >
> > I have attached the egg containing virtualenvpath module.
> >
> > Pylint does not seem to find the package in the virtualenv locations even
> > though they are on sys.path.
> >
> > I also tried added the egg-path to sys.path directly and pylint did not
> > find it.
> 
> I think the problem is missing for eggs support in logilab-astng.
> 
> > How do I configure an init-hook in the .pylintrc file ?
> >
> > I tried:
> >
> > import virtualenvpath as vep;vep.build_path()
> >
> > This resulted in the Exception:
> 
> yep this is a known bug which is fixed in latest logilab-common release (huum, 
> may be unreleased yet I don't remember right now).
> 


-------------------------------------------------------


More information about the Python-Projects mailing list