-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
"poetry build" with relative path dependency in pyproject.toml raises ValueError #266
Comments
I am not sure why you would want to build a package with local path dependencies. The Local path dependencies should only be used for applications, which do not require |
I see what you mean, and after some tinkering with poetry to deploy an application that has local (unpublished) dependencies, I've found that I don't need |
I agree. I think it would be best to make |
@sdispater I just tried and it builds fine with git dependencies. I also found nothing in the code related to that. Am I missing something? :/ |
@cauebs You are right. I was confusing it with something else. But this is definitely something we should add to the build command. |
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 just ran in to this today… but I am seeing it in poetry 1.0.0 with a relative path in my dev dependencies. Different bug? |
I ran into this today. I'd expect This error is caused by unpacking the sdist into a temp directory which no longer has the relative path. This |
Building wheels unpacks the sdist which includes a copy of the `pyproject.toml`. If dependencies are delcared using relative paths (such as `mymodule = { path = '../mymodule' }`), these relative paths are not available from the temporary directory created to unpack and build the wheel. This fix retains the original path to the project for those relative dependencies. Fixes python-poetry#266.
Building wheels unpacks the sdist which includes a copy of the `pyproject.toml`. If dependencies are delcared using relative paths (such as `mymodule = { path = '../mymodule' }`), these relative paths are not available from the temporary directory created to unpack and build the wheel. This fix retains the original path to the project for those relative dependencies. Fixes python-poetry#266.
Hi @sdispater, According to the doc https://python-poetry.org/docs/versions/#path-dependencies And if you suggest to not use local path dependencies, then could you please explain here/in doc for what porpuses path-dependencies feature was implemented? It is confusing to figure out the use of path-dependencies by the current documentation and face such issues. Thanks. |
Should this issue be reopened? The way I was expecting A use case for this is to have local packages that are not necessarily published but could be included in several related projects. Either way, it would be good to have this behaviour documented in more detail at https://python-poetry.org/docs/versions/#path-dependencies |
Hello, the However, with this workaround the path will not end up in the I will keep this issue close in favor of #2046. Please go on there for further discussion. fin swimmer |
I think I'm having a similar or related issue #4739 |
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. |
Issue
Note:
I:\Projects\bar-project
exists, whilepoetry add bar-project --path ../bar-project
andpoetry install bar-project
definitely work.Changing the dependency path to an absolute path in
pyproject.toml
as below makespoetry build
work without any errors.The text was updated successfully, but these errors were encountered: