Allow URL requirements in editable installs (#1614)

## Summary

If an editable package declares a direct URL requirement, we currently
error since it's not considered an "allowed" requirement. We need to add
those URLs to the allow-list.

Closes https://github.com/astral-sh/uv/issues/1603.
This commit is contained in:
Charlie Marsh 2024-02-17 15:20:23 -05:00 committed by GitHub
parent 8675f66e74
commit 5c4cecaa85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 75 additions and 7 deletions

View file

@ -0,0 +1,2 @@
def func():
pass

View file

@ -0,0 +1,22 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "hatchling-editable"
description = 'A simple editable package with a URL dependency.'
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = []
authors = [
{ name = "Astral Software Inc.", email = "hey@astral.sh" },
]
classifiers = []
dependencies = [
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl"
]
version = "0.1.0"
[tool.hatch.metadata]
allow-direct-references = true

View file

@ -2,7 +2,7 @@
name = "poetry-editable"
version = "0.1.0"
description = ""
authors = ["konstin <konstin@mailbox.org>"]
authors = ["Astral Software Inc. <hey@astral.sh>"]
[tool.poetry.dependencies]
python = "^3.10"