[Distutils] Alternate static metadata PEP submission...

David Cournapeau david at ar.media.kyoto-u.ac.jp
Fri Oct 16 05:22:20 CEST 2009

David Lyon wrote:
> On Thu, 15 Oct 2009 14:48:00 +0900, David Cournapeau
> <david at ar.media.kyoto-u.ac.jp> wrote:
>> Let's take a common case: using cython/pyrex to accelerate some code,
>> but you still want people to be able to use your package without a C
>> compiler (bzr, cython are examples of such packages).
> I believe that's possible through the [postinstall] section..

The problem is a bit more complicated, because it cannot be handled in
one single section. You need to detect cython (configuration stage), you
need to modify the extensions sources depending on this, and you need to
install different files depending on this: it touches at least config,
build_ext and install commands to use the distutils terminology.

This is similar to my main complain about distutils: you can't easily
share data between commands. AFAIK, the only way to do it is to use the
Distribute class instance, which is problematic as that's what most
tools on top of distutils need to monkey-patch.


More information about the Distutils-SIG mailing list