Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d0b0b4

Browse files
DOC: distutils: Add a docstring to show_config().
Thanks to Sergey Kojoian for the original patch to create the docstring. Closes gh-9258.
1 parent 9b7e890 commit 6d0b0b4

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

doc/source/reference/routines.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Utility
4444
:toctree: generated/
4545

4646
get_include
47+
show_config
4748
deprecate
4849
deprecate_with_doc
4950

numpy/distutils/misc_util.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,43 @@ def get_info(name):
23262326
return g.get(name, g.get(name + "_info", {}))
23272327
23282328
def show():
2329+
"""
2330+
Show libraries in the system on which NumPy was built.
2331+
2332+
Print information about various resources (libraries, library
2333+
directories, include directories, etc.) in the system on which
2334+
NumPy was built.
2335+
2336+
See Also
2337+
--------
2338+
get_include : Returns the directory containing NumPy C
2339+
header files.
2340+
2341+
Notes
2342+
-----
2343+
Classes specifying the information to be printed are defined
2344+
in the `numpy.distutils.system_info` module.
2345+
2346+
Information may include:
2347+
2348+
* ``language``: language used to write the libraries (mostly
2349+
C or f77)
2350+
* ``libraries``: names of libraries found in the system
2351+
* ``library_dirs``: directories containing the libraries
2352+
* ``include_dirs``: directories containing library header files
2353+
* ``src_dirs``: directories containing library source files
2354+
* ``define_macros``: preprocessor macros used by
2355+
``distutils.setup``
2356+
2357+
Examples
2358+
--------
2359+
>>> np.show_config()
2360+
blas_opt_info:
2361+
language = c
2362+
define_macros = [('HAVE_CBLAS', None)]
2363+
libraries = ['openblas', 'openblas']
2364+
library_dirs = ['/usr/local/lib']
2365+
"""
23292366
for name,info_dict in globals().items():
23302367
if name[0] == "_" or type(info_dict) is not type({}): continue
23312368
print(name + ":")

0 commit comments

Comments
 (0)