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
()
| 2150 | return include_dirs |
| 2151 | |
| 2152 | def 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 | |
| 2172 | def get_pkg_info(pkgname, dirs=None): |
| 2173 | """ |
no test coverage detected