diff options
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`. |