Skip to content

[Backport staging-25.11] python-env: wrap python executable with --resolve-argv0 - #462248

Merged
mweinelt merged 1 commit into
staging-25.11from
backport-462090-to-staging-25.11
Nov 16, 2025
Merged

mweinelt merged 1 commit into
staging-25.11from
backport-462090-to-staging-25.11

Conversation

@nixpkgs-ci

@nixpkgs-ci nixpkgs-ci Bot commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

Bot-based backport to staging-25.11, triggered by a label in #462090.

Before merging, ensure that this backport is acceptable for the release.

Even as a non-committer, if you find that it is not acceptable, leave a comment.

This commit, together with #442540,
changes the way python environments are built:

  * When generating wrappers for python executables, we inherit argv[0]
    from the wrapper. This causes python to initialize its configuration
    in the environment with all the correct paths.
  * We also resolve argv[0] to absolute path when invoking python from
    PATH. This helps set python's prefix correctly on Darwin.

The end result is that python environments no longer appear to be venvs,
and behave more like a vanilla python installation. In addition it's
possible to create a venv using an environment and use packages from
both the environment and the venv.

(cherry picked from commit abe61db)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR's base branch is set to staging-25.11, but 0 commits from the staging branch are included. Make sure you know the right base branch for your changes, then:

  • If the changes should go to the staging branch, change the base branch.
  • If the changes should go to the staging-25.11 branch, rebase your PR onto the correct merge-base:
    # git rebase --onto $(git merge-base upstream/staging-25.11 HEAD) $(git merge-base upstream/staging HEAD)
    git rebase --onto 38ab204bb046824462652a482411f669c87bcbfa 38ab204bb046824462652a482411f669c87bcbfa
    git push --force-with-lease

@mweinelt

Copy link
Copy Markdown
Member

Apparently an issue with the CI scrip that cannot work correctly with the first backport.

Therefore bypassing CI.

@mweinelt
mweinelt merged commit ba25286 into staging-25.11 Nov 16, 2025
@mweinelt
mweinelt deleted the backport-462090-to-staging-25.11 branch November 16, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants