setup.py adding options (aka setup.py --enable-feature )

Posted by pygabriel on Stack Overflow See other posts from Stack Overflow or by pygabriel
Published on 2010-04-25T18:05:10Z Indexed on 2010/04/25 18:33 UTC
Read the original article Hit count: 414

Filed under:
|
|

I'm looking for a way to include some feature in a python (extension) module in installation phase.

In a practical manner:

I have a python library that has 2 implementations of the same function, one internal (slow) and one that depends from an external library (fast, in C).

I want that this library is optional and can be activated at compile/install time using a flag like:

python setup.py install # (it doesn't include the fast library)
python setup.py --enable-fast install

I have to use Distutils, however all solution are well accepted!

© Stack Overflow or respective owner

Related posts about python

Related posts about packaging