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

embed manifest in windows extensions #46815

Closed
mhammond opened this issue Apr 6, 2008 · 6 comments
Closed

embed manifest in windows extensions #46815

mhammond opened this issue Apr 6, 2008 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@mhammond
Copy link
Contributor

mhammond commented Apr 6, 2008

BPO 2563
Nosy @mhammond, @tiran, @tpn
Files
  • embed_manifest.patch: embed the manifest using mt.exe
  • 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/mhammond'
    closed_at = <Date 2009-01-19.10:39:23.821>
    created_at = <Date 2008-04-06.13:52:28.640>
    labels = ['type-feature', 'library']
    title = 'embed manifest in windows extensions'
    updated_at = <Date 2009-01-19.10:39:23.820>
    user = 'https://github.com/mhammond'

    bugs.python.org fields:

    activity = <Date 2009-01-19.10:39:23.820>
    actor = 'mhammond'
    assignee = 'mhammond'
    closed = True
    closed_date = <Date 2009-01-19.10:39:23.821>
    closer = 'mhammond'
    components = ['Distutils']
    creation = <Date 2008-04-06.13:52:28.640>
    creator = 'mhammond'
    dependencies = []
    files = ['9962']
    hgrepos = []
    issue_num = 2563
    keywords = ['patch']
    message_count = 6.0
    messages = ['65034', '65160', '65164', '65218', '74724', '80157']
    nosy_count = 4.0
    nosy_names = ['mhammond', 'christian.heimes', 'trent', 'aheider']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue2563'
    versions = ['Python 2.6']

    @mhammond
    Copy link
    Contributor Author

    mhammond commented Apr 6, 2008

    The move to vs2008 has caused .manifest files to be created next to
    distutils created extensions modules, rather than being embedded as
    recommended by Microsoft.

    See http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx

    The attached patch achieves this by telling the compiler to generate the
    manifest in the temp dir, them embeds that manifest using mt.exe

    Adding Christian for comment (hopefully the correct Christian this time

    • sorry about that :)

    @mhammond mhammond self-assigned this Apr 6, 2008
    @mhammond mhammond added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Apr 6, 2008
    @tpn
    Copy link
    Member

    tpn commented Apr 8, 2008

    +1 from me on principle (haven't tested).

    @tiran
    Copy link
    Member

    tiran commented Apr 8, 2008

    Yes, it's me ;)

    I'm +1 on the feature but I haven't reviewed your patch. IIRC and unless
    I'm not mistaken you can tell the linker to embed the manifest without
    the extra mt.exe dance.

    @mhammond
    Copy link
    Contributor Author

    mhammond commented Apr 8, 2008

    Note that we are actually using the linker to *generate* the manifest
    (something linkers pre VC2005 couldn't do), so if we could tell the
    linker to skip that manifest generation and embed it directly in the
    DLL, it would certainly be easier. But, IIRC (which I may not), you can
    embed a manifest directly via the linker by converting the manifest to a
    resource and linking that - however, that conversion still requires an
    extra tool. This is the alternative process outlined on the MS page I
    linked to. And finally, it seems Visual Studio itself embeds the
    resource this way.

    So if there is a way to embed the manifest without an additional step, I
    don't know about it :)

    @aheider
    Copy link
    Mannequin

    aheider mannequin commented Oct 14, 2008

    Note that this patch will break the loading of compiled modules on
    machines without the MS CRT redistributable installed.

    See bpo-4120

    @mhammond
    Copy link
    Contributor Author

    Given bug 4120, this seems the most appropriate resolution...

    @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
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants