Support PEP 582 - Python local packages directory
HLFH opened this issue · 3 comments
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
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.
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.
PEP 582 has now been rejected, so I'm going to close this issue.