numpy.distutils.misc_util.
get_numpy_include_dirs
default_config_dict
Return a configuration dictionary for usage in configuration() function defined in file setup_<name>.py.
dict_append
appendpath
generate_config_py
Generate config.py file containing system_info information used during building the package.
config[‘py_modules’].append((packagename, ‘__config__’,generate_config_py))
get_cmd
allpath
Convert a /-separated pathname to one using the OS’s path separator.
get_mathlibs
Return the MATHLIB line from numpyconfig.h
terminal_has_colors
red_text
green_text
yellow_text
blue_text
cyan_text
cyg2win32
mingw32
Return true when using mingw32 environment.
all_strings
Return True if all items in lst are string objects.
has_f_sources
Return True if sources contains Fortran files
has_cxx_sources
Return True if sources contains C++ files
filter_sources
Return four lists of filenames containing C, C++, Fortran, and Fortran 90 module sources, respectively.
get_dependencies
is_local_src_dir
Return true if directory is local directory.
get_ext_source_files
get_script_files
get_lib_source_files
get_data_files
dot_join
get_frame
Return frame object from call stack with given level.
minrelpath
Resolve and ‘.’ from path.
njoin
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.
is_sequence
is_string
as_list
gpaths
Apply glob to paths and prepend local_path if needed.
get_language
Determine language value (c,f77,f90) from sources
quote_args
get_build_architecture
get_info
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.
See also
Configuration.add_npy_pkg_config
Configuration.add_installed_library
get_pkg_info
Examples
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:
Configuration
config.add_extension('foo', sources=['foo.c'], extra_info=npymath_info)
Return library info for the given package.
The LibraryInfo instance containing the build information.
get_num_build_jobs
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
numpy.distutils