Return True if all items in lst are string objects.
Convert a /-separated pathname to one using the OS’s path separator.
Convert a path from Cygwin-native to Windows-native.
Uses the cygpath utility (part of the Base install) to do the actual conversion. Falls back to returning the original path if this fails.
Handles the default /cygdrive mount prefix as well as the /proc/cygdrive portable prefix, custom cygdrive prefixes such as / or /mnt, and absolute paths such as /usr/src/ or /home/username
The path to convert
The converted path
Documentation for cygpath utility: https://cygwin.com/cygwin-ug-net/cygpath.html Documentation for the C function it wraps: https://cygwin.com/cygwin-api/func-cygwin-conv-path.html
Return a configuration dictionary for usage in configuration() function defined in file setup_<name>.py.
Use importlib machinery to import a module modname from the file modfile. Depending on the spec.loader, the module may not be registered in sys.modules.
Return four lists of filenames containing C, C++, Fortran, and Fortran 90 module sources, respectively.
Generate config.py file containing system_info information used during building the package.
config[‘py_modules’].append((packagename, ‘__config__’,generate_config_py))
Return frame object from call stack with given level.
Return an info dict for a given C library.
The info dict contains the necessary options to use the C library.
Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini).
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.
The dictionary with build information.
If the package is not found.
To get the necessary information for the npymath library from NumPy:
>>> npymath_info = np.distutils.misc_util.get_info('npymath')
>>> npymath_info
{'define_macros': [], 'libraries': ['npymath'], 'library_dirs':
['.../numpy/_core/lib'], 'include_dirs': ['.../numpy/_core/include']}
This info dict can then be used as input to a Configuration instance:
config.add_extension('foo', sources=['foo.c'], extra_info=npymath_info)
Determine language value (c,f77,f90) from sources
Return the MATHLIB line from numpyconfig.h
Get number of parallel build jobs set by the –parallel command line argument of setup.py If the command did not receive a setting the environment variable NPY_NUM_BUILD_JOBS is checked. If that is unset, return the number of processors on the system, with a maximum of 8 (to prevent overloading the system if there a lot of CPUs).
number of parallel jobs that can be run
Return library info for the given package.
Name of the package (should match the name of the .ini file, without the extension, e.g. foo for the file foo.ini).
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.
The LibraryInfo instance containing the build information.
If the package is not found.
Apply glob to paths and prepend local_path if needed.
Return True if sources contains C++ files
Return True if sources contains Fortran files
Return true if directory is local directory.
Return true when using mingw32 environment.
Resolve and ‘.’ from path.
Join two or more pathname components + - convert a /-separated pathname to one using the OS’s path separator. - resolve and from path.
Either passing n arguments as in njoin(‘a’,’b’), or a sequence of n names as in njoin([‘a’,’b’]) is handled, or a mixture of such arguments.
Some flags are valid for C but not C++. Prune them.
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/distutils/misc_util.html