This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maarten
Recipients maarten, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-11-11.11:09:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605092944.99.0.846170667375.issue42321@roundup.psfhosted.org>
In-reply-to
Content
`PCbuild/readme.txt` contains a little paragraph about how to build a static python library.
The resulting static `python.lib` library contains all python C API functions.

Windows DLL's don't allow missing symbols, so C extensions modules must link with a library containing the python C API symbols.
When a C extension links to the static python library, it will contain a copy of all python symbols.
This means that python C symbols are used twice: once by a static python.exe executable, and once for each C extension (_extension.pyw).

Is there a way to use C extensions with a static Windows python.exe wuch that the python symbols are used only once?
Does a statically built Windows python.exe support C extension modules at all?

Thanks

I'm currently working on a conan build recipe for cpython at https://github.com/conan-io/conan-center-index/pull/1510
Fow now, I'm disabling extensions on a static MSVC build.
History
Date User Action Args
2020-11-11 11:09:05maartensetrecipients: + maarten, paul.moore, tim.golden, zach.ware, steve.dower
2020-11-11 11:09:04maartensetmessageid: <1605092944.99.0.846170667375.issue42321@roundup.psfhosted.org>
2020-11-11 11:09:04maartenlinkissue42321 messages
2020-11-11 11:09:04maartencreate