python-poetry / python-poetry/poetry
Support `subdirectory` option for `url` dependencies
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the FAQ and general documentation and believe that my question is not already covered.
Feature Request
As with the subdirectory option on git dependencies, it would be nice to be able to install from urls pointing to archive files where the target project is not at the root level. This is convenient for example when installing from the archives GitHub automatically creates for tags, like https://github.com/{owner}/{repo}/archive/refs/tags/{tag}.tar.gz.
It's worth noting that pip does support it, e.g.:
myproject @ https://github.com/{owner}/{repo}/archive/refs/tags/{tag}.tar.gz#subdirectory={myproject_dir}
Although it doesn't seem to be explicitly documented.
As a side note, I guess that support for the subdirectory option could be added for local archive files too, that is when providing a path dependency. But that implies also supporting it when the path is just a directory, which seems quite pointless.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace URL dependency parsing and archive installation alongside the existing git dependency subdirectory support; use the pip-style #subdirectory example as the behavioral reference. Done means an archive URL can target a nested project directory, with tests covering the supported URL form; local path archives remain an open side note.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100