Poetry: Dependency rooted in a subfolder of a GIT repository

Created on 20 Dec 2018  路  10Comments  路  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

Feature request

Currently, as far as I can figure, it is impossible to use a GIT repository as a dependency source where the setup.py or pyproject.toml file is not in the root directory but in some sub-folder of the repository.

E.g. GIT repo structure:

  • GIT root

    • pythonmodule

    • setup.py / pyproject.toml

    • module1.py

    • module2.py

    • javamodule

    • pom.xml

    • cmodule

    • Makefile

In this example I would like to be able to point poetry to the pythonmodule directory inside this repo, for example using poetry add mydep --git https://github.com/foo/bar.git --path path/to/mydep. I don't think this can be accomplished via a separate repository definition, however, the documentation is a bit scarce on that topic.

Feature

Most helpful comment

It isn't fully implemented until now. A lot has changed since I wrote #1822. This PR is now splitted in https://github.com/python-poetry/poetry-core/pull/9 and https://github.com/python-poetry/poetry/pull/2242 But there is still a lot to do. I cannot tell when this will be ready.

All 10 comments

Same here, i'm able to install a git dependency using pip with its VCS support

pip install "git+https://github.com/nmslib/hnswlib.git@bb2a1d1#egg=hnswlib&subdirectory=python_bindings"

It would be nice if we can do it using poetry add.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

I would love to switch to Poetry and it looks like this is the only thing preventing me. Very excited to see this feature is in progress!

Ready for testing :)

@finswimmer Thank you for your work on this! Is there any way I can help with getting your PRs ready for review?

Was this functionality implemented? My team relies on poetry and we just started breaking some of our code up into a separate git repo - we would need this to continue to use poetry

Was this functionality implemented? My team relies on poetry and we just started breaking some of our code up into a separate git repo - we would need this to continue to use poetry

As far as I can tell, it has been implemented, but not merged nor released. This still-in-progress implementation is here: https://github.com/python-poetry/poetry/pull/1822.

It isn't fully implemented until now. A lot has changed since I wrote #1822. This PR is now splitted in https://github.com/python-poetry/poetry-core/pull/9 and https://github.com/python-poetry/poetry/pull/2242 But there is still a lot to do. I cannot tell when this will be ready.

We are also looking into breaking out shared modules into a separate repo, and it would be awesome to be able to keep them all in one repository and reference them by sub-directories.

Was this page helpful?
0 / 5 - 0 ratings