[SciPy-User] setuptools messing with sdists using numpy.distutils and Fortran libraries
Juan Luis Cano
juanlu001 at gmail.com
Mon Dec 23 16:16:14 EST 2013
On 12/23/2013 09:39 PM, Ralf Gommers wrote:
>
>
>
> On Mon, Dec 23, 2013 at 7:46 PM, Juan Luis Cano <juanlu001 at gmail.com
> <mailto:juanlu001 at gmail.com>> wrote:
>
> I'm trying to build a Python package using some Fortran libraries, and
> started using also setuptools at a certain point because I wanted to
> take advantage of "setup.py develop". However, despite being
> stated that
> one should just import setuptools before numpy.distutils imports:
>
> http://mail.scipy.org/pipermail/numpy-discussion/2013-September/067784.html
>
> I found that "setup.py sdist" works differently whether setuptools has
> been imported or not - i.e. not the same files get excluded or
> included.
>
> In particular, I had problems with the .pyf files of a Fortran
> library I
> created, included using config.add_extension. Without setuptools it
> works, and the .pyf files get included, but with setuptools they are
> missing. This results in failed installations later on.
>
>
> You could special case "develop" in this manner to not have setuptools
> mess up other commands:
> https://github.com/scipy/scipy/blob/master/setup.py#L205
>
> In case you want the specific example, here is the diff between the
> working and non-working setup.py:
>
> https://github.com/Pybonacci/poliastro/compare/0.1.x...master#diff-29
>
> The use of setuptools is not crucial for this project, but I'm
> interested in knowing what's going on here.
>
>
> Both setuptools and numpy.distutils monkeypatch the behavior of
> distutils commands, so there's very little logic to what happens.
> Different commands typically break in different ways. You can try to
> debug it to understand but if you value your sanity, you should try to
> avoid that:)
Yeah, at least for today I value it :) Thank you very much!
Cheers
Juan Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20131223/4d6e2b66/attachment.html>
More information about the SciPy-User
mailing list