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 Hatch's {root:uri} paths in editable installs #2492

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

charliermarsh
Copy link
Member

Summary

If a package uses Hatch's root.uri feature, we currently error:

dependencies = [
  "black @ {root:uri}/../black_editable"
]

Even though we're using PEP 517 hooks to get the metadata, which should support this. The problem is that we load the full PyProjectToml, which means we parse the requirements, which means we reject what looks like a relative URL in dependencies.

Instead, we should only enforce a limited subset of pyproject.toml (arguably none).

Closes #2475.

@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label Mar 16, 2024
@charliermarsh charliermarsh changed the title Avoid enforcing pyproject.toml correctness in build hooks Add support for Hatch's {root:uri} paths in editable installs Mar 16, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) March 16, 2024 18:42
@charliermarsh charliermarsh merged commit db5898b into main Mar 16, 2024
30 checks passed
@charliermarsh charliermarsh deleted the charlie/b branch March 16, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv fails to parse pyproject.toml when using Hatchling's {root:uri} for dependencies
1 participant