[Distutils] Patch for your setuptools issue

Tarek Ziadé ziade.tarek at gmail.com
Mon Jun 1 20:21:26 CEST 2009


On Mon, Jun 1, 2009 at 8:00 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Tarek Ziadé <ziade.tarek <at> gmail.com> writes:
>>
>> How is your Python installed ? It works for me I have installed python
>> from a trunk checkout
>> by running the usual ./configure && make && make install
>
> Python is installed in an "usr/" subdirectory of its own checkout.
> Now, the strange thing is:
> - if I `cd` into usr and then run `bin/easy_install`, C extensions compile fine
> - if I run directly `usr/bin/easy_install`, the headers are not found
>
> Perhaps setuptools/distutils is confused by the fact that there is already a
> Makefile (or a python executable) in the current directory?

build_ext calls distutils.sysconfig.get_python_inc() wich looks for
Modules/Setup.dist or  Modules/Setup.local in the current directory
to decide if we are trying to build Python itself, to behave slighlty
differently.

So if you are in a python checkout it's  the case. This is not really
robust, but explains why you have that behavior.

I consider the whole  distutils.sysconfig module quite messy, and I
have proposed in python-ideas its removal in favor
of a standalone sysconfig module in the stdlib that would provide
static information on how Python was build
(eg like a Makefile) + a few helpers

Tarek

>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
>



-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list