summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2020-01-24 15:56:33 -0500
committerWarren Weckesser <warren.weckesser@gmail.com>2020-01-25 09:06:51 -0500
commit6d0b0b474e471fb233c3c0e4113f09e143ba526e (patch)
treecd13567078b44d4a2811413324d74164b0ded750
parent9b7e890b014f6ad3b4288246f0565f7afd6eca84 (diff)
downloadnumpy-6d0b0b474e471fb233c3c0e4113f09e143ba526e.tar.gz
DOC: distutils: Add a docstring to show_config().
Thanks to Sergey Kojoian for the original patch to create the docstring. Closes gh-9258.
-rw-r--r--doc/source/reference/routines.other.rst1
-rw-r--r--numpy/distutils/misc_util.py37
2 files changed, 38 insertions, 0 deletions
diff --git a/doc/source/reference/routines.other.rst b/doc/source/reference/routines.other.rst
index 28c9a1ad1..def5b3e3c 100644
--- a/doc/source/reference/routines.other.rst
+++ b/doc/source/reference/routines.other.rst
@@ -44,6 +44,7 @@ Utility
:toctree: generated/
get_include
+ show_config
deprecate
deprecate_with_doc
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index 4be1df94e..ea8128eab 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -2326,6 +2326,43 @@ def generate_config_py(target):
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 + ":")