[Python-projects] pylint easy_install-ability

John J Lee jjl at pobox.com
Sun May 21 22:04:38 CEST 2006


On Sun, 21 May 2006, Sylvain Thénault wrote:
[...]
>> I attempted to do it by downloading by hand and then using easy_install,
>> but (after a fair amount of effort) got what I think was some sort of
>> namespace package error about the package named "common".  I'll try again,
>> but thought I'd first ask here if the lack of PyPI registration was
>> deliberate (it just takes a "python setup.py register" to do it).
>
> strange, pylint and its dependencies are registered into PyPI (though
> I regularly forget this step, so the latest releases are probably not
> registered. We'll fix this asap). I wasn't aware of this easy_install
> ability, good to know :).

When you say "this easy_install ability", I'm not sure whether you mean 
easy_install's existence, or its working with pylint.  easy_install 
*didn't* work for me with pylint (though plain setup.py install worked 
fine).  I think the PyPI thing was not the only reason for that failure -- 
I think the use of a "namespace package" (two projects distributed 
separately that both live under package logilab) is stopping easy_install 
working.  I guess easy_install (currently, at least) only supports 
namespace packages if you do it the setuptools way, putting 
"""__import__('pkg_resources').declare_namespace(__name__)""" in your 
__init__.py files.

http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages


> BTW, this make me think: how do you specify
> dependencies in a setup.py file ? Distutils support that now ?
[...]

No.  setuptools does that (but its interface is extrememly similar to 
distutils, and of course it uses distutils; it's likely to be in Python 
2.6, since Guido wants it).  Supports 2.3 and up, has a small bootstrap 
for people who don't have it installed, supports dependencies, plugins and 
multi-version installs, and does some of the standard things that are ugly 
with vanilla distutils like data file installation alongside packages. 
Some people seem to hate it with a depth of feeling usually reserved for 
tabs-versus-spaces, though ;-)

setuptools has a close relationship with "Python eggs" (projects installed 
as eggs have discoverable metadata; eggs are installed as .egg zip files 
or .egg directories, or as .egg-link files), and with "easy_install". 
easy_install works with non-setuptools packages too, though (not all of 
them, of course -- distutils usage is too variable for that -- but it 
works most of the time, and it's getting better as more project authors 
support it).

Oops, that's a longer sales pitch than I intended to write :-)


John


More information about the Python-Projects mailing list