Skip to content

Commit

Permalink
DOC: distutils: Add a docstring to show_config().
Browse files Browse the repository at this point in the history
Thanks to Sergey Kojoian for the original patch to create
the docstring.

Closes numpygh-9258.
  • Loading branch information
WarrenWeckesser committed Jan 25, 2020
1 parent 9b7e890 commit 6d0b0b4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/reference/routines.other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Utility
:toctree: generated/

get_include
show_config
deprecate
deprecate_with_doc

Expand Down
37 changes: 37 additions & 0 deletions numpy/distutils/misc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2326,6 +2326,43 @@ def get_info(name):
return g.get(name, g.get(name + "_info", {}))
def show():
"""
Show libraries in the system on which NumPy was built.
Print information about various resources (libraries, library
directories, include directories, etc.) in the system on which
NumPy was built.
See Also
--------
get_include : Returns the directory containing NumPy C
header files.
Notes
-----
Classes specifying the information to be printed are defined
in the `numpy.distutils.system_info` module.
Information may include:
* ``language``: language used to write the libraries (mostly
C or f77)
* ``libraries``: names of libraries found in the system
* ``library_dirs``: directories containing the libraries
* ``include_dirs``: directories containing library header files
* ``src_dirs``: directories containing library source files
* ``define_macros``: preprocessor macros used by
``distutils.setup``
Examples
--------
>>> np.show_config()
blas_opt_info:
language = c
define_macros = [('HAVE_CBLAS', None)]
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
"""
for name,info_dict in globals().items():
if name[0] == "_" or type(info_dict) is not type({}): continue
print(name + ":")
Expand Down

0 comments on commit 6d0b0b4

Please sign in to comment.