Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop libpython38.a from Windows release #81532

Closed
zooba opened this issue Jun 20, 2019 · 7 comments
Closed

Drop libpython38.a from Windows release #81532

zooba opened this issue Jun 20, 2019 · 7 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@zooba
Copy link
Member

zooba commented Jun 20, 2019

BPO 37351
Nosy @pfmoore, @tjguk, @ocroquette, @merwok, @zware, @zooba, @dstufft
PRs
  • bpo-37351: Removes libpython38.a from standard Windows distribution #14276
  • [3.8] bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276) #14298
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2019-06-24.17:32:22.237>
    created_at = <Date 2019-06-20.16:54:16.730>
    labels = ['3.8', 'type-bug', 'library', '3.9', 'OS-windows']
    title = 'Drop libpython38.a from Windows release'
    updated_at = <Date 2020-11-04.22:27:40.159>
    user = 'https://github.com/zooba'

    bugs.python.org fields:

    activity = <Date 2020-11-04.22:27:40.159>
    actor = 'ocroquette'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2019-06-24.17:32:22.237>
    closer = 'steve.dower'
    components = ['Distutils', 'Windows']
    creation = <Date 2019-06-20.16:54:16.730>
    creator = 'steve.dower'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37351
    keywords = ['patch']
    message_count = 7.0
    messages = ['346136', '346138', '346151', '346254', '346300', '346421', '380373']
    nosy_count = 7.0
    nosy_names = ['paul.moore', 'tim.golden', 'ocroquette', 'eric.araujo', 'zach.ware', 'steve.dower', 'dstufft']
    pr_nums = ['14276', '14298']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37351'
    versions = ['Python 3.8', 'Python 3.9']

    @zooba
    Copy link
    Member Author

    zooba commented Jun 20, 2019

    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.

    @zooba zooba added 3.8 only security fixes 3.9 only security fixes labels Jun 20, 2019
    @zooba zooba self-assigned this Jun 20, 2019
    @zooba zooba added OS-windows type-bug An unexpected behavior, bug, or error labels Jun 20, 2019
    @zooba
    Copy link
    Member Author

    zooba commented Jun 20, 2019

    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?

    @zooba zooba added the stdlib Python modules in the Lib dir label Jun 20, 2019
    @zooba
    Copy link
    Member Author

    zooba commented Jun 20, 2019

    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?

    @zooba
    Copy link
    Member Author

    zooba commented Jun 21, 2019

    New changeset f569092 by Steve Dower in branch 'master':
    bpo-37351: Removes libpython38.a from standard Windows distribution (bpo-14276)
    f569092

    @zooba
    Copy link
    Member Author

    zooba commented Jun 22, 2019

    New changeset fa23bd2 by Steve Dower in branch '3.8':
    bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276)
    fa23bd2

    @zooba
    Copy link
    Member Author

    zooba commented Jun 24, 2019

    Fixing --compiler=mingw32 is left for another bug, if anyone is so motivated.

    @zooba zooba closed this as completed Jun 24, 2019
    @ocroquette
    Copy link
    Mannequin

    ocroquette mannequin commented Nov 4, 2020

    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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant