[Distutils] How to best install pkg_resources?

Arve Knudsen arve.knudsen at gmail.com
Tue Dec 14 15:14:40 CET 2010


I was finally able to determine the reason. I am installing a specialized
'install' command with the argument 'cmdclass={"install": install}' to
setup(). I've attached a revised case which demonstrates the problem.

In my specialized 'install' class I try to wrap the normal installation
command by calling setuptools.command.install.install, but apparently that's
not enough. What should I call to invoke the normal installation command?

Thanks,
Arve

On Tue, Dec 14, 2010 at 2:58 PM, Arve Knudsen <arve.knudsen at gmail.com>wrote:

> On Tue, Dec 14, 2010 at 2:40 PM, Arve Knudsen <arve.knudsen at gmail.com>wrote:
>
>> On Tue, Dec 14, 2010 at 2:24 PM, P.J. Eby <pje at telecommunity.com> wrote:
>>
>>> At 01:42 PM 12/14/2010 +0100, Arve Knudsen wrote:
>>>
>>>> Hi
>>>>
>>>> Using Distribute in my setup.py, how do I best ensure that pkg_resources
>>>> gets installed along with my package? I've tried
>>>> 'install_requires=["setuptools>=0.6"]' as an argument to setup(), but
>>>> setuptools didn't get installed.
>>>>
>>>
>>>
>>> I don't know about Distribute, but it should definitely get installed if
>>> you're using setuptools.  Under what installation scenario(s) did setuptools
>>> *not* get installed?
>>>
>>
>> Basically, my project bundles Distribute through distribute_setup.py, so
>> Distribute doesn't need to be preinstalled. When I try to install my project
>> (through 'python setup.py install') on a machine without
>> setuptools/pkg_resources installed, however, setuptools does not get
>> installed.
>>
>> I'll try to reduce this to a simple case, i.e. a dummy project that
>> requires setuptools.
>>
>
> This is strange, with a super-simple case (see attachment), Distribute gets
> installed without even having to state install_requires. Apparently,
> Distribute is supposed to install itself automatically. I wonder what goes
> wrong in my more elaborate project..
>
> Arve
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20101214/a899f4ef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/zip
Size: 513 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20101214/a899f4ef/attachment-0001.zip>


More information about the Distutils-SIG mailing list