[Numpy-discussion] Problems using add_npy_pkg_config

Ralf Gommers ralf.gommers at gmail.com
Sat Aug 15 05:19:51 EDT 2015


On Fri, Aug 14, 2015 at 11:25 PM, Christian Engwer <
christian.engwer at uni-muenster.de> wrote:

> Dear Ralf,
>
> > I stared at it for a while, and can't figure it out despite you following
> > the example in the add_npy_pkg_config docstring pretty much to the
> letter.
> > When you see that the error is generated in a function that starts with
> ``#
> > XXX: another ugly workaround to circumvent distutils brain damage.``,
> > you're usually in trouble.....
>
> what a pity... do you have an alternative suggestion? Is there a good
> alternative, e.g. using cmake, to distribute python modules?
>

I wouldn't give up on distutils here (yet). For distributing/installing
python packages, PyPi + pip are the de-facto standard and pip is currently
tied to distutils/setuptools unfortunately.

That I can't figure out your issue in 20 minutes doesn't mean it's not
fixable, it just means that I'm not smart enough to keep the distutils
"design" in my head:)

The code you're trying to use isn't well tested because while a lot of
packages use numpy.distutils with compiled code, very few Python packages
expose a C API. For example Scipy doesn't use `add_npy_pkg_config` or
`add_installed_library` at all. Those functions work for numpy itself
though, so they can't be completely broken.

If no one has an answer here, what I would do if I were you is break out
your debugger and figure out what's in `pkg` when you build numpy itself
and why it's None when you build your own code.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150815/901b2f18/attachment.html>


More information about the NumPy-Discussion mailing list