Skip to content

Portable python via launcher #141567

@qznc

Description

@qznc

Feature or enhancement

Proposal:

Proof of Concept: https://github.com/qznc/portable_python

I'm bothered by the way how Bazel handles Python. While looking for alternatives, I came up with this proof of concept for a portable python distribution: It uses a statically linked musl libc to be independent of whatever host Linux there is. It is actually just a launcher for an embedded Python, such that dlopen(3) still works as intended.

In contrast to venv, you can zip this up and deploy it elsewhere. In contrast to containers, this is just a folder.

It has not been tested in lots of scenarios, so I'm not quite sure about the limitations yet. It seems to be more widely usable than similar approaches I found.

I doubt it makes sense for cpython to adopt it but for awareness, I created this issue.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions