Dear all, I'm trying to use the numpy distutils to install native C libraries. These are part of a larger roject and should be usable standalone. I managed to install headers and libs, but now I experience problems writing the corresponding pkg file. I first tried to do the trick without numpy, but getting all the pathes right in all different setups is really a mess.
Please a find a m.w.e. attached to this mail. It consists of foo.c foo.ini.in and setup.py. I'm sure I missed some important part, but somehow the distribution variable in build_src seems to be uniinitalized. Calling > python setup.py install --prefix=/tmp/foo.inst fils with ... File "/usr/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py", line 257, in build_npy_pkg_config pkg_path = self.distribution.package_dir[pkg] TypeError: 'NoneType' object has no attribute '__getitem__' I also tried to adopt parts of the numpy setup, but these use sub-modules, which I don't need... might this the the cause of my problems? Any help is highly appreciated ;-) Cheers Christian
int foo() { return 10; }
[meta] Name=@foo@ Version=1.0 Description=dummy description [default] Cflags=-I@prefix@/include Libs=
def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('foo',parent_package,top_path) config.set_options(ignore_setup_xxx_py=True, assume_default_configuration=True) config.add_installed_library('foo', sources=['foo.c'], install_dir='lib') config.add_npy_pkg_config('foo.ini.in', 'lib', {'foo': 'bar'}) return config if __name__ == '__main__': from numpy.distutils.core import setup setup (configuration=configuration)
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion