MCPcopy Create free account
hub / github.com/numpy/numpy / get_npy_pkg_dir

Function get_npy_pkg_dir

numpy/distutils/misc_util.py:2152–2170  ·  view source on GitHub ↗

Return the path where to find the npy-pkg-config directory. If the NPY_PKG_CONFIG_PATH environment variable is set, the value of that is returned. Otherwise, a path inside the location of the numpy module is returned. The NPY_PKG_CONFIG_PATH can be useful when cross-compiling, mai

()

Source from the content-addressed store, hash-verified

2150 return include_dirs
2151
2152def get_npy_pkg_dir():
2153 """Return the path where to find the npy-pkg-config directory.
2154
2155 If the NPY_PKG_CONFIG_PATH environment variable is set, the value of that
2156 is returned. Otherwise, a path inside the location of the numpy module is
2157 returned.
2158
2159 The NPY_PKG_CONFIG_PATH can be useful when cross-compiling, maintaining
2160 customized npy-pkg-config .ini files for the cross-compilation
2161 environment, and using them when cross-compiling.
2162
2163 """
2164 d = os.environ.get('NPY_PKG_CONFIG_PATH')
2165 if d is not None:
2166 return d
2167 spec = importlib.util.find_spec('numpy')
2168 d = os.path.join(os.path.dirname(spec.origin),
2169 'core', 'lib', 'npy-pkg-config')
2170 return d
2171
2172def get_pkg_info(pkgname, dirs=None):
2173 """

Callers 1

get_pkg_infoFunction · 0.85

Calls 2

getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected