Undocumented
Class |
|
No class docstring; 0/11 instance variable, 0/4 class variable, 30/38 methods documented |
Class |
|
Container to hold information on an installable library. |
Function | all |
Return True if all items in lst are string objects. |
Function | allpath |
Convert a /-separated pathname to one using the OS's path separator. |
Function | appendpath |
Undocumented |
Function | as |
Undocumented |
Function | blue |
Undocumented |
Function | clean |
Undocumented |
Function | colour |
Undocumented |
Function | cyan |
Undocumented |
Function | cyg2win32 |
Convert a path from Cygwin-native to Windows-native. |
Function | default |
Return a configuration dictionary for usage in configuration() function defined in file setup_<name>.py. |
Function | default |
Undocumented |
Function | dict |
Undocumented |
Function | dot |
Undocumented |
Function | exec |
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. |
Function | filter |
Return four lists of filenames containing C, C++, Fortran, and Fortran 90 module sources, respectively. |
Function | general |
Return a directory name relative to top_path and files contained. |
Function | general |
Undocumented |
Function | generate |
Generate config.py file containing system_info information used during building the package. |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Return frame object from call stack with given level. |
Function | get |
Return an info dict for a given C library. |
Function | get |
Determine language value (c,f77,f90) from sources |
Function | get |
Undocumented |
Function | get |
Return the MATHLIB line from numpyconfig.h |
Function | get |
Return the path where to find the npy-pkg-config directory. |
Function | get |
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). |
Function | get |
Undocumented |
Function | get |
Return path of the module given a frame object from the call stack. |
Function | get |
Return library info for the given package. |
Function | get |
Undocumented |
Function | get |
Return the correct file extension for shared libraries. |
Function | gpaths |
Apply glob to paths and prepend local_path if needed. |
Function | green |
Undocumented |
Function | has |
Return True if sources contains C++ files |
Function | has |
Return True if sources contains Fortran files |
Function | is |
Undocumented |
Function | is |
Undocumented |
Function | is |
Return true if directory is local directory. |
Function | is |
Undocumented |
Function | is |
Undocumented |
Function | make |
Undocumented |
Function | mingw32 |
Return true when using mingw32 environment. |
Function | minrelpath |
Resolve .. and '.' from path. |
Function | msvc |
Return name of MSVC runtime library if Python was built with MSVC >= 7 |
Function | msvc |
Return major version of MSVC runtime coded like get_build_msvc_version |
Function | msvc |
Return version of MSVC runtime library, as defined by __MSC_VER__ macro |
Function | msvc |
Return version major and minor of compiler instance if it is MSVC, raise an exception otherwise. |
Function | njoin |
Join two or more pathname components + - convert a /-separated pathname to one using the OS's path separator. - resolve .. and . from path. |
Function | quote |
Quote list of arguments. |
Function | red |
Undocumented |
Function | rel |
Return path relative to parent_path. |
Function | sanitize |
Some flags are valid for C but not C++. Prune them. |
Function | sorted |
sorts output of python glob for https://bugs.python.org/issue30461 to allow extensions to have reproducible build results |
Function | terminal |
Undocumented |
Function | yellow |
Undocumented |
Variable | cxx |
Undocumented |
Variable | f90 |
Undocumented |
Variable | f90 |
Undocumented |
Variable | fortran |
Undocumented |
Function | _commandline |
Return commandline representation used to determine if a file needs to be recompiled |
Function | _fix |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Return a list of Fortran f90 module names that given source file defines. |
Function | _get |
Undocumented |
Variable | _colour |
Undocumented |
Variable | _cxx |
Undocumented |
Variable | _tdata |
Undocumented |
Variable | _tmpdirs |
Undocumented |
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
Notes
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
Parameters | |
path:str | The path to convert |
Returns | |
str | converted_path - The converted path |
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.
- Usage:
- config['py_modules'].append((packagename, '__config__',generate_config_py))
Return an info dict for a given C library.
The info dict contains the necessary options to use the C library.
Examples
To get the necessary information for the npymath library from NumPy:
>>> 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']}
This info dict can then be used as input to a Configuration
instance:
config.add_extension('foo', sources=['foo.c'], extra_info=npymath_info)
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. |
Returns | |
dict | info - The dictionary with build information. |
Raises | |
PkgNotFound | If the package is not found. |
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, maintaining customized npy-pkg-config .ini files for the cross-compilation environment, and using them when cross-compiling.
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).
Returns | |
int | out - number of parallel jobs that can be run |
Return path of the module given a frame object from the call stack.
Returned path is relative to parent_path when given, otherwise it is absolute path.
Return library info for the given package.
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. |
Returns | |
class instance | pkginfo - The LibraryInfo instance containing the build information. |
Raises | |
PkgNotFound | If the package is not found. |
Return the correct file extension for shared libraries.
Notes
For Python shared libs, so_ext
will typically be '.so' on Linux and OS X,
and '.pyd' on Windows. For Python >= 3.2 so_ext
has a tag prepended on
POSIX systems according to PEP 3149.
Parameters | |
isbool , optional | Whether the shared library is a Python extension. Default is False. |
Returns | |
str | so_ext - The shared library extension. |
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.
sorts output of python glob for https://bugs.python.org/issue30461 to allow extensions to have reproducible build results