Question: How to install dependencies as editables?
Consider following configuration:
[project.optional-dependencies]
sub_requirement = ["sub_requirement @ {root:uri}/sub_requirement"]
How to tell hatch to install sub_requirement in editable mode?
Inserting -e in any place in requirement string gives similar value errors:
ValueError: Dependency #1 of option `sub_requirement` of field `project.optional-dependencies` is invalid: Expected end or semicolon (after URL and whitespace)
sub_requirement @ -e file:///Users/bobronium/.../sub_requirement
The feature @Bobronium you've mentioned is described here. I was struggling with the same. With this technique you can install from source (also defining a specific git reference like a branch). But it is not installing the dependencies in editable mode (referencing a git clone into src folder of the virtual env, like pip install -e does). 👉 Discussion on that is here #588
I ended up setting skip-install = true and creating a workaround using requirements.txt files and uv. However, with the latest version of uv you can do this, which seems to work:
[project]
...
dependencies = [
...
"local_dep"
...
]
[tool.uv.sources]
local_dep = { path = "path/to/directory", editable = "true" }
or more simply, add it through the cli:
uv add --editable path/to/package/directory