cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-141671: PyMODINIT_FUNC: apply `__declspec(dllexport)` on Windows

Open encukou opened this issue 1 month ago • 4 comments

  • Issue: gh-141671

encukou avatar Nov 17 '25 16:11 encukou

cc @jaraco / @pfmoore: what are your thoughts on removing /EXPORT from setuptools/distutils on Python 3.15+?

encukou avatar Nov 17 '25 16:11 encukou

TBH, I have no view. My knowledge of C is very out of date, so I wouldn't trust anything I might say anyway...

pfmoore avatar Nov 17 '25 17:11 pfmoore

The /EXPORT from setuptools has definitely caused Cython an amount of pain before (although some of that was self-inflicted....). It'd be nice not to have to define PyInit_ just to to make the name exist. Although I suspect we can't really avoid it in a realistic timeline.

(Edit: admittedly we also aren't the people that it's designed to help either)

da-woods avatar Nov 18 '25 08:11 da-woods

Here's a version that removes some redundant defines (setting things to defaults).

encukou avatar Dec 16 '25 15:12 encukou

:robot: New build scheduled with the buildbot fleet by @encukou for commit 5091b7963c654b66482a0431e33ffff1e6da66ea :robot:

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F141672%2Fmerge

If you want to schedule another build, you need to add the :hammer: test-with-buildbots label again.

bedevere-bot avatar Dec 19 '25 16:12 bedevere-bot