[Distutils] Correct way to allow C extension building to fail?

Andreas Klöckner lists at informa.tiker.net
Wed Jul 2 23:01:51 CEST 2008

Hi Andrew,

On Mittwoch 02 Juli 2008, Andrew Straw wrote:
> I'm not sure if this will work, but it might:
> class NotPlatformDependentDistribution(Distribution):
>     # Force platform-independent build.
>     def has_ext_modules(self):
>         return False
> setup(
>       distclass = NotPlatformDependentDistribution,
>       )

First of all, thanks for your help. However, when I try your solution, it 
seems to disable the C extension outright, which is not what I'm going for. 
Instead, I would like setuptools to try the build and simply forget about it 
if it fails.

Can that be done somehow?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080702/bbcc6c73/attachment.pgp>

More information about the Distutils-SIG mailing list