Skip to content

Conversation

@charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 21, 2025

Summary

This reverts commit 6df7dab, which is causing more trouble than it is solving problems. Specifically, for tools like Jupyter and MyPy, because the shebang in the script of the --with environment uses the Python of the --with environment (and that environment does not have the requisite .pth file), they're not able to see any of the base environment's dependencies. We considered copying over those executables and rewriting the shebangs, and that could work for MyPy, but it ends up breaking Jupyter:

Screenshot 2025-07-19 at 9 40 48 PM

Closes #14749.

Closes #14729.

@charliermarsh charliermarsh requested a review from zanieb July 21, 2025 13:02
@charliermarsh charliermarsh marked this pull request as ready for review July 21, 2025 13:02
@charliermarsh charliermarsh temporarily deployed to uv-test-registries July 21, 2025 13:05 — with GitHub Actions Inactive
zanieb added a commit that referenced this pull request Jul 22, 2025
…ments (#14790)

This is an alternative to #14788
which has the benefit that it addresses
#13327 which would be an issue
even if we reverted #14447.

There are two changes here

1. We copy entry points into the ephemeral environment, and rewrite
their shebangs (or trampoline target) to ensure the ephemeral
environment is not bypassed.
2. We link `etc/jupyter` and `share/jupyter` data directories into the
ephemeral environment, this is in order to ensure the above doesn't
break Jupyter which unfortunately cannot find the `share` directory
otherwise. I'd love not to do this, as it seems brittle and we don't
have a motivating use-case beyond Jupyter. I've opened
jupyterlab/jupyterlab#17716 upstream for
discussion, as there is a viable patch that could be made upstream to
resolve the problem. I've limited the fix to Jupyter directories so we
can remove it without breakage.

Closes #14729
Closes #13327
Closes #14749

---------

Co-authored-by: Charlie Marsh <[email protected]>
@zanieb
Copy link
Member

zanieb commented Jul 22, 2025

Hopefully not needed, but still viable following #14790 if we need it.

@zanieb zanieb closed this Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants