[Distutils] Fwd: [RFC] Python 2.7 Distutils extra features

Tarek Ziadé ziade.tarek at gmail.com
Wed Jan 6 20:05:05 CET 2010


oops, forgot to reply-all


---------- Forwarded message ----------
From: Tarek Ziadé <ziade.tarek at gmail.com>
Date: Wed, Jan 6, 2010 at 8:04 PM
Subject: Re: [Distutils] [RFC] Python 2.7 Distutils extra features
To: exarkun at twistedmatrix.com


2010/1/6  <exarkun at twistedmatrix.com>:
> On 05:30 pm, ziade.tarek at gmail.com wrote:
>>
>> On Wed, Jan 6, 2010 at 6:13 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> Besides the PEP-related features, I would like to add some tiny
>>> features in Distutils for Python 2.7 before the alpha stage is over :
>>>
>>> - a test command, that just uses the new unittest discovery to run
>>> unittest-compatible tests.
>>>
>>> - a new option for sdist called 'extra_files', that will allow to list
>>> extra files to be included in the distribution. these
>>>  files will not be installed by 'install', just be part of the
>>> distribution.
>>
>> Ooops forgot the third one, (which might lead to further discussions):
>>
>> - a very basic pre/post commit hook for the install command.
>
> Being able to run some code after install is done would certainly be useful.
>  A couple things I wonder about...
>
> Can the packages that were just installed be imported in the post hook?

I guess so.

>
> What kind of interaction would this have with the bdist installers? It'd be
> a shame of things like bdist_rpm suffered when packages took advantage of
> these hooks.

These hooks will be deactivated when any bdist_* command runs install
to create the binary tree.

Now for bdist_rpm own hooks, I guess the best way would be to make
install consumes the same two options
than bdist_rpm (pre-install, post-install) so a project will be able
to define a hook that is used by RPM or python setup.py install




> Jean-Paul
>



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



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


More information about the Distutils-SIG mailing list