Skip to content

Commit 95db088

Browse files
committed
docs: Add documentation for stubgen LIB_PATH option
1 parent 50de478 commit 95db088

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docs/api_cmake.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,14 @@ Nanobind's CMake tooling includes a convenience command to interface with the
492492
generation. Otherwise, generator expressions should not be used.
493493
Optional.
494494

495+
* - ``LIB_PATH``
496+
- List of search paths that should be considered when searching for
497+
shared libraries. This can be useful when the python module being
498+
imported depends on shared libraries that are not in the default
499+
search path. The paths are relative to ``CMAKE_CURRENT_BINARY_DIR``
500+
for build-time stub generation and relative to
501+
``CMAKE_INSTALL_PREFIX`` for install-time stub generation. Optional.
502+
495503
* - ``DEPENDS``
496504
- Any targets listed here will be marked as a dependencies. This should
497505
generally be used to list the target names of one or more prior

docs/typing.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,9 @@ The program has the following command line options:
539539

540540
.. code-block:: text
541541
542-
usage: python -m nanobind.stubgen [-h] [-o FILE] [-O PATH] [-i PATH] [-m MODULE]
543-
[-r] [-M FILE] [-P] [-D] [-q]
542+
usage: python -m nanobind.stubgen [-h] [-o FILE] [-O PATH] [-i PATH]
543+
[-L PATH] [-m MODULE] [-r] [-M FILE] [-P]
544+
[-D] [-q]
544545
545546
Generate stubs for nanobind-based extensions.
546547
@@ -550,6 +551,8 @@ The program has the following command line options:
550551
-O PATH, --output-dir PATH write generated stubs to the specified directory
551552
-i PATH, --import PATH add the directory to the Python import path (can
552553
specify multiple times)
554+
-L PATH, --lib-path PATH add directory to shared library search path (can
555+
specify multiple times)
553556
-m MODULE, --module MODULE generate a stub for the specified module (can
554557
specify multiple times)
555558
-r, --recursive recursively process submodules

0 commit comments

Comments
 (0)