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

Add support for editable dependencies #589

Closed

Conversation

RobertRosca
Copy link
Contributor

Rough implementation of editable dependencies as described in #588

This could probably be implemented in a better way, just a proof of concept.

@RobertRosca RobertRosca marked this pull request as draft November 2, 2022 21:37
@BrutalSimplicity
Copy link

BrutalSimplicity commented Nov 5, 2022

Nice work here. I'm looking into this as well, but through the amazing plugin architecture Hatch provides.

Question, will this handle transitive editable dependencies?

@RobertRosca
Copy link
Contributor Author

Internally these requirements get parsed a bit and then passed on to pip, so the behaviour is identical to what would happen if you manually installed a dependency as editable. Meaning that if you have a scenario like:

[tool.hatch.envs.dev]
dependencies = [
  "-e pkg_a @ {root:uri}/plugins/pkg_a",
  "-e pkg_a_dep @ {root:uri}/plugins/pkg_a_dep",
  ...
]

Then pkg_a_dep would be installed in editable mode, and pkg_a would then use that editable installation.

@BrutalSimplicity
Copy link

Okay. So the transitive editable dependencies would also need to be specified explicitly.

It would be great if it could infer the transitive dependency's editable packages in some way.

@RobertRosca RobertRosca marked this pull request as ready for review November 9, 2022 09:43
@ofek
Copy link
Collaborator

ofek commented Nov 14, 2022

Hey, sorry I didn't respond sooner! I've been embedding on a different team for the past 3 weeks (1 more to go).

One thing I realized during this time was that rather than this approach, I'm going to implement functionality similar to Rust's workspace concept:

@RobertRosca
Copy link
Contributor Author

No problem! That sounds interesting, I'm happy to contribute if you'd like any help.

jorisroovers added a commit to jorisroovers/gitlint that referenced this pull request Dec 6, 2022
This is workaround to do an editable install of gitlint-core:
See pypa/hatch#589

Also further refines a bunch of other CI and pyproject.toml items.
jorisroovers added a commit to jorisroovers/gitlint that referenced this pull request Dec 12, 2022
This is workaround to do an editable install of gitlint-core:
See pypa/hatch#589

Also further refines a bunch of other CI and pyproject.toml items.
@webknjaz
Copy link
Member

webknjaz commented Jan 9, 2023

@RobertRosca this PR needs rebasing to pick up the CI updates.

@ofek
Copy link
Collaborator

ofek commented Jan 16, 2023

Closing for now #589 (comment)

@ystarikovich
Copy link

Hey, @ofek do you have some issue to track on the current topic? Do you need some support with the implementation of it? We are missing this feature quite a lot

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.

5 participants