numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersRaisesReturnsBackRef
get_info(pkgname, dirs=None)

The info dict contains the necessary options to use the C library.

Parameters

pkgname : str

Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini).

dirs : sequence, optional

If given, should be a sequence of additional directories where to look for npy-pkg-config files. Those directories are searched prior to the NumPy directory.

Raises

PkgNotFound

If the package is not found.

Returns

info : dict

The dictionary with build information.

Return an info dict for a given C library.

See Also

Configuration.add_installed_library
Configuration.add_npy_pkg_config
get_pkg_info

Examples

To get the necessary information for the npymath library from NumPy:

This example is valid syntax, but we were not able to check execution
>>> npymath_info = np.distutils.misc_util.get_info('npymath')
... npymath_info #doctest: +SKIP {'define_macros': [], 'libraries': ['npymath'], 'library_dirs': ['.../numpy/core/lib'], 'include_dirs': ['.../numpy/core/include']}

config.add_extension('foo', sources=['foo.c'], extra_info=npymath_info)

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.distutils.misc_util.get_pkg_info numpy.distutils.npy_pkg_config.read_config numpy.distutils.misc_util.Configuration.add_installed_library numpy.distutils.misc_util.Configuration.add_npy_pkg_config

Local connectivity graph

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


GitHub : /numpy/distutils/misc_util.py#2214
type: <class 'function'>
Commit: