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.

classification
Title: Simplify python3.dll build
Type: enhancement Stage: resolved
Components: Windows Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: eryksun, nnemkin, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2020-06-19 16:27 by nnemkin, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20989 merged nnemkin, 2020-06-19 16:29
Messages (5)
msg371894 - (view) Author: Nikita Nemkin (nnemkin) * Date: 2020-06-19 16:27
python3.dll build process can be simplified if we use linker comment #pragma instead of .def files. Custom build targets become unnecessary and hardcoded Python DLL name can be replaced with a macro.

Also, python3.dll doesn't need DllMain and can be built with /NOENTRY.
msg372115 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-06-22 21:10
Thanks for the change. It looks good, though I would like to have a NEWS entry for this so that people can find that we made a deliberate change to this DLL.

I'd also like to do some manual testing to make sure that we aren't going to break any obscure uses. That's basically blocked on me, sorry, but I'll try and get to it asap. Feel free to ping me in a week if I haven't gotten to it.
msg372130 - (view) Author: Nikita Nemkin (nnemkin) * Date: 2020-06-22 22:30
Please take your time.

FWIW, I tested this patch by 1) comparing dumpbin /exports output; 2) comparing bunaries themselves (.dll and .lib) and 3) linking xxlmited module.

It helps that 7-zip can open .dll and .lib files files as if they were archives.
msg372199 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-06-23 19:33
New changeset 2c6e4e91c5a4d3f25908108f4ed32aba936df70c by Nikita Nemkin in branch 'master':
bpo-41039: Simplify python3.dll build (GH-20989)
https://github.com/python/cpython/commit/2c6e4e91c5a4d3f25908108f4ed32aba936df70c
msg372200 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-06-23 19:34
Thanks!
History
Date User Action Args
2022-04-11 14:59:32adminsetgithub: 85211
2020-06-23 19:34:26steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg372200

stage: patch review -> resolved
2020-06-23 19:33:30steve.dowersetmessages: + msg372199
2020-06-22 22:30:16nnemkinsetmessages: + msg372130
2020-06-22 21:10:02steve.dowersetassignee: steve.dower
messages: + msg372115
2020-06-20 12:37:58cheryl.sabellasetnosy: + eryksun
2020-06-19 16:29:41nnemkinsetkeywords: + patch
stage: patch review
pull_requests: + pull_request20163
2020-06-19 16:27:16nnemkincreate