File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,28 @@ A shared library produced by ``library()`` or ``shared_library()`` built like th
6464
6565 is installed to ``libdir `` by default. If the only reason the shared library exists
6666is to be used inside the Python package being built, then it is best to modify
67- the install location to be within the Python package itself:
67+ the install location, via the ``install_dir `` argument, to be within
68+ the Python package itself:
6869
69- .. code-block :: python
70+ .. TODO update the text block below to 'meson' when
71+ .. meson lexer is updated to fix
72+ .. https://github.com/pygments/pygments/issues/2918
7073
71- install_path: py.get_install_dir() / ' mypkg/subdir'
74+ .. code-block :: text
75+
76+ example_lib = shared_library(
77+ 'example',
78+ 'examplelib.c',
79+ install: true,
80+ install_dir: py.get_install_dir() / 'mypkg/subdir',
81+ )
7282
7383 Then an extension module in the same install directory can link against the
7484shared library in a portable manner by using ``install_rpath ``:
7585
7686.. code-block :: meson
7787
78- py3 .extension_module('_extmodule',
88+ py .extension_module('_extmodule',
7989 '_extmodule.c',
8090 link_with: example_lib,
8191 install: true,
You can’t perform that action at this time.
0 commit comments