Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to depend on local dependencies? #47

Closed
radix opened this issue Apr 16, 2018 · 12 comments
Closed

Is there a way to depend on local dependencies? #47

radix opened this issue Apr 16, 2018 · 12 comments
Labels
area/config Related to configuration management area/installer Related to the dependency installer kind/feature Feature requests/implementations

Comments

@radix
Copy link
Contributor

radix commented Apr 16, 2018

If I prefer to include my vendored dependencies directly in my repository, is there a way for me to specify them as a dependency?

e.g., if I have vendor/foo, it seems it'd be nice if I could specify a dependency like

[tool.poetry.dependencies]
foo-package = {path = "vendor/foo"}
@sdispater
Copy link
Member

If they are in a distribution format (tarball or wheel), yes you can (since version 0.8.0), like so:

[tool.poetry.dependencies]
foo-package = { file = "relative/path/to/distribution" }

@radix
Copy link
Contributor Author

radix commented Apr 16, 2018

yeah, I saw file... but what if they're not?

When I'm working in Rust, I can point to any directory that has a Cargo.toml as another dependency with {path = "vendor/foo"} syntax. What about a similar thing for any directory with a pyproject.toml?

@sdispater
Copy link
Member

I plan on adding this, yes. It will most likely land in the next feature release.

@sdispater sdispater added enhancement area/installer Related to the dependency installer area/config Related to configuration management labels Apr 16, 2018
@sdispater
Copy link
Member

This is now supported in release 0.9.0.

@victornoel
Copy link

@sdispater I can't find a documentation for this feature, can you explain what is the syntax to do this?

@sdispater
Copy link
Member

The documentation is here: https://poetry.eustace.io/docs/versions/#path-dependencies

@victornoel
Copy link

@sdispater ah perfect, thank you!

@Natureshadow
Copy link

Can I somehow make this so poetry only uses the defined path if available, but if not, still checks normal repositories?

@brycedrennan brycedrennan added kind/feature Feature requests/implementations and removed enhancement labels Aug 17, 2019
@erodrig
Copy link

erodrig commented Jul 22, 2020

But what about already installed dependencies, like another project (library) installed

@gordonhart
Copy link

Updated docs link for anybody still landing on this page: https://python-poetry.org/docs/dependency-specification#path-dependencies

@gdubicki
Copy link

gdubicki commented Aug 4, 2021

Please note that path dependencies are not always a solution. See #34 for more info.

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/config Related to configuration management area/installer Related to the dependency installer kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

8 participants