[Distutils] Role of distutils.cfg
Ralf Gommers
ralf.gommers at gmail.com
Fri Nov 11 03:22:09 EST 2016
On Fri, Nov 11, 2016 at 9:12 PM, Christoph Groth <christoph at grothesque.org>
wrote:
> Ralf Gommers wrote:
>
> You forgot to add all your links.
>>
>
> I accidentally deleted them when re-posting my message. The first time I
> sent it to this list without being subscribed, and it was unfortunately
> *silently* dropped. (I had assumed that postings by non-members are
> moderated.) Here they are:
>
> [1] https://pypi.python.org/pypi/kwant/1.2.2
> [2] https://gitlab.kwant-project.org/kwant/kwant/blob/master/setup.py
> [3] https://gitlab.kwant-project.org/kwant/kwant/issues/48#note_2494
>
> Most robust is to only pass metadata (name, maintainer, url,
>> install_requires, etc.). In a number of cases you're forced to pass
>> ext_modules or cmdclass, which usually works fine. Passing individual
>> paths, compiler flags, etc. sounds unhealthy.
>>
>
> Sounds reasonable, thanks for your advice.
>
> Is there any alternative to passing ext_modules?
>
What Numpy and Scipy do is pass a single Configuration instance, and define
all extensions and libraries in nested setup.py files, one per submodule.
Example: https://github.com/scipy/scipy/blob/master/setup.py#L327
If you pass ext_modules as a list of Extension instances, you'd likely also
avoid the issue. Example:
https://github.com/PyWavelets/pywt/blob/master/setup.py#L145
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20161111/05e708c2/attachment.html>
More information about the Distutils-SIG
mailing list