python-poetry / python-poetry/poetry

Support `subdirectory` option for `url` dependencies

Open
#7,840 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.