[Distutils] easy_install question

Thomas Heller theller at python.net
Mon Sep 26 19:22:45 CEST 2005


"Phillip J. Eby" <pje at telecommunity.com> writes:

> At 09:38 PM 9/23/2005 +0200, Thomas Heller wrote:
>
>>- When I run 'easy_install ctypes', the behaviour depends on the current
>>directory.  If I run this when the current dir contains a 'ctypes'
>>subdirectory, it doesn't search pypi^H^H^H^HCheeseShop for this name,
>>instead it seems to attempt to install from source in that directory.
>>Is that intended?
>
> Yes.  EasyInstall's arguments may be a URL, an existing local filename, or 
> a "requirement" string, and the precedence is in that order.  (i.e., it's 
> checked to see if it's a URL, then if it's a filename, and finally parsing 
> as a requirement string is done.)
>
>
>>   Can I override this behaviour?
>
> Add a version specifier, e.g. "ctypes==4.0", or use an absolute URL.

Hm.  A big advantage is that I don't have to remember the URL.

>>- When I install a package which requires another package is there a way
>>to specify a download url for the required package?
>
> The --find-links option can include download links as well as URLs of pages 
> containing download links.  If you pass a URL that ends with a recognizable 
> distutils filename, EasyInstall will use it if it matches the version 
> requirement(s).
>
> A question: are you embedding EasyInstall in something else, or are these 
> questions about direct use?

No, direct use.  The use case is a little bit weird, because I was
trying to install comtypes (via the pypi link), and comtypes requires an
'inofficial' ctypes version which is available on the comtypes SF files
area.

Thomas



More information about the Distutils-SIG mailing list