From 22dcb692adefea7d51e480e36a53446cc0777c01 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 Jun 2022 00:51:54 -0400 Subject: python module: implicitly add python dep to extensions If there isn't a preexisting dependency on python, append one. It's almost assuredly needed, so just do the right thing out of the box. --- .../snippets/python-extension-module-implicit-dependency.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/markdown/snippets/python-extension-module-implicit-dependency.md (limited to 'docs/markdown/snippets/python-extension-module-implicit-dependency.md') diff --git a/docs/markdown/snippets/python-extension-module-implicit-dependency.md b/docs/markdown/snippets/python-extension-module-implicit-dependency.md new file mode 100644 index 0000000..1b98df8 --- /dev/null +++ b/docs/markdown/snippets/python-extension-module-implicit-dependency.md @@ -0,0 +1,13 @@ +## Python extension modules now depend on the python library by default + +Python extension modules are usually expected to link to the python library +and/or its headers in order to build correctly (via the default `embed: false`, +which may not actually link to the library itself). This means that every +single use of `.extension_module()` needed to include the `dependencies: +py_installation.dependency()` kwarg explicitly. + +In the interest of doing the right thing out of the box, this is now the +default for extension modules that don't already include a dependency on +python. This is not expected to break anything, because it should always be +needed. Nevertheless, `py_installation.dependency().partial_dependency()` will +be detected as already included while providing no compile/link args. -- cgit v1.1