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

Support PEP 582 - Python local packages directory #620

Closed
HLFH opened this issue Jan 6, 2023 · 3 comments
Closed

Support PEP 582 - Python local packages directory #620

HLFH opened this issue Jan 6, 2023 · 3 comments
Labels

Comments

@HLFH
Copy link

HLFH commented Jan 6, 2023

Support PEP 582 - Python local packages directory

Is your feature request related to a problem? Please describe.

PEP 582 is not supported by flit.

Describe the solution you'd like

The PEP proposes to add to Python a mechanism to automatically recognize a __pypackages__ directory and prefer importing packages installed in this location over user or global site-packages. This will avoid the steps to create, activate or deactivate “virtual environments”. Python will use the __pypackages__ from the base directory of the script when present.

Additional context

https://peps.python.org/pep-0582/

@takluyver
Copy link
Member

Note that PEP 582 is still in draft status - it's a proposal, not an accepted solution. If you want to use that model in the meantime, see PDM.

Unlike tools like PDM, Poetry or Hatch, Flit doesn't manage an environment for you. So if PEP 582 were to be accepted, I think the only thing needed would be a way for flit install to install to the new __pypackages__ folder.

@takluyver
Copy link
Member

I've tagged this 'wontfix' for now to make it clear that this isn't going to happen for now. But it could change if PEP 582 is accepted, so I'll leave the issue open.

@takluyver
Copy link
Member

PEP 582 has now been rejected, so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants