add_npy_pkg_config(self, template, install_dir, subst_dict=None)
The config file generated from :None:None:`template`
is installed in the given install directory, using :None:None:`subst_dict`
for variable substitution.
This works for both standard installs and in-place builds, i.e. the @prefix@
refer to the source directory for in-place builds.
The path of the template, relatively to the current package path.
Where to install the npy-pkg config file, relatively to the current package path.
If given, any string of the form @key@
will be replaced by subst_dict[key]
in the template file when installed. The install prefix is always available through the variable @prefix@
, since the install prefix is not easy to get reliably from setup.py.
Generate and install a npy-pkg config file from a template.
config.add_npy_pkg_config('foo.ini.in', 'lib', {'foo': bar})
[meta] Name=@foo@ Version=1.0 Description=dummy description
[default] Cflags=-I@prefix@/include Libs=
[meta] Name=bar Version=1.0 Description=dummy description
[default] Cflags=-Iprefix_dir/include Libs=
and will be installed as foo.ini in the 'lib' subpath.
When cross-compiling with numpy distutils, it might be necessary to use modified npy-pkg-config files. Using the default/generated files will link with the host libraries (i.e. libnpymath.a). For cross-compilation you of-course need to link with target libraries, while using the host Python installation.
You can copy out the numpy/core/lib/npy-pkg-config directory, add a pkgdir value to the .ini files and set NPY_PKG_CONFIG_PATH environment variable to point to the directory with the modified npy-pkg-config files.
[meta] Name=npymath Description=Portable, core math library implementing C99 standard Version=0.1
[variables] pkgname=numpy.core pkgdir=/build/arm-linux-gnueabi/sysroot/usr/lib/python3.7/site-packages/numpy/core prefix=${pkgdir} libdir=${prefix}/lib includedir=${prefix}/include
[default] Libs=-L${libdir} -lnpymath Cflags=-I${includedir} Requires=mlib
See :[msvc] Libs=/LIBPATH:${libdir} npymath.lib Cflags=/INCLUDE:${includedir} Requires=mlib
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.distutils.misc_util.get_info
numpy.distutils.misc_util.get_pkg_info
numpy.distutils.misc_util.Configuration.add_installed_library
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them