poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Support `subdirectory` option for `url` dependencies

Open mateo-roldan-sg opened this issue 2 years ago • 5 comments

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] 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.

mateo-roldan-sg avatar Apr 26 '23 12:04 mateo-roldan-sg

duplicate #5811 please close

dimbleby avatar Apr 26 '23 13:04 dimbleby

Technically, #5811 is a (probably stale) PR. If there is not an issue yet (I haven't searched for one), I think we can keep this one open.

As for local path dependencies, python-poetry/poetry-core#467 is a prerequisite.

radoering avatar Apr 26 '23 15:04 radoering

Thanks! I think I didn't find it because only searched for issues, not PRs.

mateo-roldan-sg avatar Apr 26 '23 15:04 mateo-roldan-sg

Is there anything I can do to help this move forward?

mateo-roldan-sg avatar Aug 31 '23 19:08 mateo-roldan-sg

@python-poetry/triage

mateo-roldan-sg avatar Jul 12 '25 04:07 mateo-roldan-sg