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: Drop libpython38.a from Windows release
Type: behavior Stage: resolved
Components: Distutils, Windows Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: dstufft, eric.araujo, ocroquette, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2019-06-20 16:54 by steve.dower, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14276 merged steve.dower, 2019-06-20 19:51
PR 14298 merged steve.dower, 2019-06-21 21:30
Messages (7)
msg346136 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-20 16:54
The step of generating a MinGW import library for Python releases is very rarely used, forces us to take extra build dependencies, and is better handled by the end-users who need it.

We will drop the libpython38.a file from the main distribution, and update the docs to contain the commands necessary (users who are using MinGW will have these tools easily available):

gendef python38.dll > tmp.def
dlltool --dllname python38.dll --def tmp.def --output-lib libpython38.a

Here is where Anaconda have been doing this themselves, rather than relying on our distributed file: https://github.com/AnacondaRecipes/aggregate/blob/master/libpython-feedstock/recipe/bld.bat

We also heard that the regex module no longer relies on this: https://mail.python.org/archives/list/python-dev@python.org/message/A7IXOTARTYJUNSCFAU3YY2VOVILC4EBY/

A few people do regularly use this file, according to https://mobile.twitter.com/zooba/status/1139661637521031168 which is why including the instructions and porting notes is important. I haven't heard from any of them that they would have trouble running the above commands themselves.
msg346138 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-20 17:03
Realising that this may have an impact on distutils.cygwincompiler.Mingw32CCompiler, but I can't tell from the source code how/whether it would pick up the pre-packaged libpython38.a. Does anyone know?
msg346151 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-20 18:12
Turns out that using distutils/setuptools with --compiler=mingw32 is just doomed to fail when it hits get_msvcr(), which has never been updated for Python 3.5 onwards.

So I think it's probably safe to assume that this scenario isn't a real thing and people are linking MinGW/Python in some other way?
msg346254 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-21 21:28
New changeset f5690925df897cf45818bf944b28d13f37b9f8ca by Steve Dower in branch 'master':
bpo-37351: Removes libpython38.a from standard Windows distribution (#14276)
https://github.com/python/cpython/commit/f5690925df897cf45818bf944b28d13f37b9f8ca
msg346300 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-22 21:08
New changeset fa23bd286fb7719bd7601da0b713457589f5536f by Steve Dower in branch '3.8':
bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276)
https://github.com/python/cpython/commit/fa23bd286fb7719bd7601da0b713457589f5536f
msg346421 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-24 17:32
Fixing --compiler=mingw32 is left for another bug, if anyone is so motivated.
msg380373 - (view) Author: Olivier Croquette (ocroquette) Date: 2020-11-04 22:27
I don't know what version of gendef is meant, but the one from MSYS2 / MinGW64 doesn't output the result on stdout, but rather writes the file "python38.def" itself. So the commands are the following:

cd libs
gendef ..\python38.dll
dlltool --dllname python38.dll --def python38.def --output-lib libpython38.a
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81532
2020-11-04 22:27:40ocroquettesetnosy: + ocroquette
messages: + msg380373
2019-06-24 17:32:22steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg346421

stage: patch review -> resolved
2019-06-22 21:08:06steve.dowersetmessages: + msg346300
2019-06-21 21:30:39steve.dowersetpull_requests: + pull_request14122
2019-06-21 21:28:50steve.dowersetmessages: + msg346254
2019-06-20 19:51:58steve.dowersetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request14100
2019-06-20 18:12:34steve.dowersetmessages: + msg346151
2019-06-20 17:03:42steve.dowersetnosy: + eric.araujo, dstufft
messages: + msg346138
components: + Distutils
2019-06-20 16:54:16steve.dowercreate