diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-04-18 22:27:09 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-05-09 10:49:04 -0400 |
commit | aa874ea0d020aee90595c2adfb43866fcaabfdb7 (patch) | |
tree | 2ac79d646259bfb338ccc3ccbf2cd2fc80b30296 /docs/markdown/Python-module.md | |
parent | 7c4087ace5b3b1c8669d7afd2b6fbcc0c816f1d4 (diff) | |
download | meson-aa874ea0d020aee90595c2adfb43866fcaabfdb7.zip meson-aa874ea0d020aee90595c2adfb43866fcaabfdb7.tar.gz meson-aa874ea0d020aee90595c2adfb43866fcaabfdb7.tar.bz2 |
python module: default extensions to hidden symbol visibility
python compiled extensions should never need to expose any symbol other
than PyInit_* which is declared with default visibility via
PyMODINIT_FUNC on supported compilers.
Thus, a reasonably sane default is to mark any other symbols as hidden,
while still respecting any manually specified visibility.
Gate this on the version of python itself, as not all versions decorate
PyMODINIT_FUNC properly.
Diffstat (limited to 'docs/markdown/Python-module.md')
-rw-r--r-- | docs/markdown/Python-module.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/markdown/Python-module.md b/docs/markdown/Python-module.md index 0602955..8809fd0 100644 --- a/docs/markdown/Python-module.md +++ b/docs/markdown/Python-module.md @@ -93,6 +93,12 @@ the addition of the following: it will be appended to that location. This keyword argument is mutually exclusive with `install_dir` +Additionally, the following diverge from [[shared_module]]'s default behavior: + +- `gnu_symbol_visibility`: if unset, it will default to `'hidden'` on versions + of Python that support this (the python headers define `PyMODINIT_FUNC` has + default visibility). + `extension_module` does not add any dependencies to the library so user may need to add `dependencies : py_installation.dependency()`, see [[dependency]]. |