[Distutils] People want CPAN

Tarek Ziadé ziade.tarek at gmail.com
Thu Nov 12 23:12:28 CET 2009

On Thu, Nov 12, 2009 at 12:31 PM, Pauli Virtanen <pav+sp at iki.fi> wrote:
> Thu, 12 Nov 2009 10:54:41 +0100, Tarek Ziadé wrote:
> [clip]
>>>>>>> get_install_paths('FOO')
>>>> And that's the API we want to add in sysconfig, roughly.
>>> That does not solve the problem about getting FOO in the first place
>>> when calling get_install_path.
>> Why that ? where "FOO" comes from ? if it's an option you provide at
>> build time like you said, earlier, you just pass it to the API to get
>> the paths.
>> FOO is not coming from nowhere...
> If this is not painfully clear already, the user passes FOO to the command
>        python setup.py install --prefix=FOO
> Now, clearly the distutils install subcommand knows what FOO is.
> But does build_ext? Does sysconfig?

The install command takes FOO, and build several paths with it:


The other commands that needs to get the same path can rebuild it using an API,
that does:

get_paths(scheme, vars={'prefix': 'FOO')

Instead of doing what David did:

$ python setup.py build_ext install --prefix=FOO

They can do:

$ python setup.py build_ext --prefix=FOO

and don't require to use the install command anymore to get these paths cooked.

Remember that the build step has nothing to do with the install step,
and David in his example was doing a build that was not relocatable,
e.g. receiving the install paths and applying them in the binaries.

So instead of having this paths created by code in the install command,
they are moved in an API than can be used by install or by any other command.

Is that clearer ?


More information about the Distutils-SIG mailing list