diff options
author | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2020-03-03 14:44:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 15:44:19 +0200 |
commit | 6894bbc6d396b87464cbc21516d239d5f94f13b7 (patch) | |
tree | 9a111187f246e93e03bb9cc7f358b1a209e2d49e /doc/source/reference | |
parent | 3296617cc4c0d4a82520caa411050f7c0aeb9aa5 (diff) | |
download | numpy-6894bbc6d396b87464cbc21516d239d5f94f13b7.tar.gz |
DOC: Add missing imports, definitions and dummy file (#15616)
* DOC: fix imports and defs to pass refguide checks
Add empty file foo.c at runtime to run distutils config.
Diffstat (limited to 'doc/source/reference')
-rw-r--r-- | doc/source/reference/distutils.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/source/reference/distutils.rst b/doc/source/reference/distutils.rst index fef3ee5fb..6057c7ed0 100644 --- a/doc/source/reference/distutils.rst +++ b/doc/source/reference/distutils.rst @@ -117,6 +117,11 @@ install the C library, you just use the method `add_installed_library` instead o `add_library`, which takes the same arguments except for an additional ``install_dir`` argument:: + .. hidden in a comment so as to be included in refguide but not rendered documentation + >>> import numpy.distutils.misc_util + >>> config = np.distutils.misc_util.Configuration(None, '', '.') + >>> with open('foo.c', 'w') as f: pass + >>> config.add_installed_library('foo', sources=['foo.c'], install_dir='lib') npy-pkg-config files @@ -180,8 +185,8 @@ Reusing a C library from another package Info are easily retrieved from the `get_info` function in `numpy.distutils.misc_util`:: - >>> info = get_info('npymath') - >>> config.add_extension('foo', sources=['foo.c'], extra_info=**info) + >>> info = np.distutils.misc_util.get_info('npymath') + >>> config.add_extension('foo', sources=['foo.c'], extra_info=info) An additional list of paths to look for .ini files can be given to `get_info`. |