Skip to content

fix: ignore installed when running pip#1040

Merged
henryiii merged 5 commits into
pypa:mainfrom
henryiii:henryiii/fix/ignoreinstalled
Apr 20, 2026
Merged

fix: ignore installed when running pip#1040
henryiii merged 5 commits into
pypa:mainfrom
henryiii:henryiii/fix/ignoreinstalled

Conversation

@henryiii

@henryiii henryiii commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #1037. Alternative, to, and closes #1038.

This isn't normally possible, as it's a new environment, but PYTHONPATH can cause pip to see stuff that's not in there.

Should not be required for uv, since it doesn't need PYTHONPATH to run, while pip might.

🤖 Assisted-by: OpenCode:Kimi-K2.5

Changelog

  • Added changelog fragment: docs/changelog/<pr_number>.<type>.rst
    • Types: feature, bugfix, doc, removal, misc
    • Example: 123.feature.rst containing Add custom backend support - by :user:`yourname`

Checklist

  • Tests pass locally (tox)
  • Code follows project style (tox -e fix)
  • Type checks pass (tox -e type)
  • Documentation builds (tox -e docs)

This isn't normally possible, as it's a new environment, but PYTHONPATH can cause pip to see stuff that's not in there.

Assisted-by: OpenCode:Kimi-K2.5
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/fix/ignoreinstalled branch from 0b45cb0 to 6162ab5 Compare April 16, 2026 19:35
@layday

layday commented Apr 16, 2026

Copy link
Copy Markdown
Member

This works but it'd be a good to have a test which verifies that it does.

@henryiii

Copy link
Copy Markdown
Contributor Author

I thought about it, you'd have to set up a separate venv, point the PYTHONPATH there, and then see if it still installs and builds? Or do you have a better idea for a test? This does verify that the flag gets passed.

@layday

layday commented Apr 16, 2026

Copy link
Copy Markdown
Member

How's this?

@layday

layday commented Apr 16, 2026

Copy link
Copy Markdown
Member

We should probably add pip as a test dependency if you're okay with the test.

Comment thread tests/test_env.py
henryiii and others added 2 commits April 16, 2026 17:19
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@layday layday force-pushed the henryiii/fix/ignoreinstalled branch from 4367293 to de45fc0 Compare April 17, 2026 21:38
Signed-off-by: Henry Schreiner <henryfs@prinecton.edu>
@henryiii henryiii merged commit 6d8039a into pypa:main Apr 20, 2026
65 checks passed
@henryiii henryiii deleted the henryiii/fix/ignoreinstalled branch April 20, 2026 12:02
@henryiii

Copy link
Copy Markdown
Contributor Author

@layday & @gaborbernat I think we are good for a patch release?

@gaborbernat

Copy link
Copy Markdown
Collaborator

Yes.

@henryiii

Copy link
Copy Markdown
Contributor Author

@layday wants a potential partial revert of #973 I think (from Discord build channel)

hoodmane added a commit to hoodmane/pyodide-build that referenced this pull request Apr 28, 2026
Workaround for pypa/build#1040 installing over our
cross numpy and scipy.
hoodmane added a commit to pyodide/pyodide-build that referenced this pull request Apr 28, 2026
Workaround for pypa/build#1040 installing over our
cross numpy and scipy.
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.

Error "Backend 'X' is not available" when PYTHONPATH contains a build dependency

3 participants