Skip to content

Commit

Permalink
feat: allow for editable pypi source dependencies when using path (#…
Browse files Browse the repository at this point in the history
…1044)

This PR adds the ability to do editable installs for pypi-packages. This
requires the project to also use a `pyproject.toml` so that we know what
build system to use.

This PR takes great inspiration on how UV does it with some changes.
1. We resolve editables for multiple platforms by using the metadata
separately.
2. We *only** actually build the wheel on install time.
3. There is some deviating installation logic because we can install
directly from locked dependencies.

I think that when this PR lands you mostly want to use editable installs
for path based dependencies that you control, instead of regular path
based dependencies.

## Locking

For locking we actually lock whether the dependency is editable and also
save a hash to the `pyproject.toml`, `setup.cfg`, or `setup.py` files.
If any of these change, the lock file is invalidated, this is analogous
to how UV does this for determining whether to re-install but their code
uses the timestamp instead.

---------

Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
Co-authored-by: Ruben Arts <ruben.arts@hotmail.com>
  • Loading branch information
3 people committed Mar 28, 2024
1 parent 94a01b5 commit 36ac560
Show file tree
Hide file tree
Showing 26 changed files with 2,270 additions and 657 deletions.
101 changes: 46 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 36ac560

Please sign in to comment.