Replies: 3 comments 8 replies
-
If I am not wrong, they are used to compile static libraries that will be linked against an extension module. So it is like an intermediate build artifact. |
Beta Was this translation helpful? Give feedback.
-
Here's an example (disregard globs): setup(name="test",
version="1.0.0",
description="Python test module",
author="Karellen, Inc.",
author_email="[email protected]",
ext_modules=[Library("shlib",
["src/shlib/*.c", "src/shlib/**/*.c"]),
Extension("test",
["src/module/*.c", "src/module/**/*.c"],
),
],
libraries=[("alib", {"sources": ["src/alib/*.c", "src/alib/**/*.c"]})
],
script_args=["-vvv", "build_clib", "-f", "build_ext", "-f", "-d", "bdist_wheel"]
) |
Beta Was this translation helpful? Give feedback.
-
Ok, I see... sorry for the confusion Looking at the file history, we can tell that initially (long time ago) the functionality was planned to build shared library, but an early commit reverted to static libraries outside of Windows: 5d73220 (probably because it was not working properly, or initial tests were failing). It seems that there was an intention to investigate this more in future changes, but I guess no other committer got the experience or managed to advance the functionality. |
Beta Was this translation helpful? Give feedback.
-
Could please someone make sense of a
setuptools.extension.Library
to me, especially the way it's supposed to work on Linux?It generates an
ar
library namedlib<x>.cpython-<pyver>-<arch>-linux-gnu.a
.What is/was its purpose and why it generates a Python-suffix-styled object archive that is guaranteed to not be usable at runtime?
Beta Was this translation helpful? Give feedback.
All reactions