-
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
top level module package with submodules - installation fails in external system with poetry built distributable #7284
Comments
Path dependencies cannot do what you want:
This is not a poetry issue (prove me wrong by using some other tool to build a wheel that does what you want!) you'll want to find some other way to model this eg perhaps you want three wheels, perhaps it should all have been a single module all along. |
What you want might be covered by #4583 (vendoring in files, essentially). Path dependencies will not do what you want, @dimbleby is right to point out that Poetry is doing exactly what you tell it to (building a package with a dependency on an absolute path). You might also be interested in #1168 if the modules can have a dependency by name outside of development. Either way, this is a duplicate of existing issues/misapplication of the tool. |
Thanks for your reply. yes, using separate wheels is what was considered as an alternative. So this actually leads to a question of why are package designs with git submodules not distributable friendly! |
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. |
NOTE: some issues are closely related and discusses this current case, which leads to the current issue.
Related issues:
Local path in wheel metadata seems wrong #4709
Project with path dependency cannot be installed with
pip install .
(or via requirements file) due to "RequirementParseError: Invalid URL" #5273Issue
The distributable (wheel) installation fails for the following package design - top_module packages with submodule packages such as the sample base tree file structure below:
when distributable is built with
poetry build
it has the local system absolute path in the metadata, for example in the above sample tree case the wheel metadata include the following:which means this will impact the distributable installation in any other external systems, which is failing the purpose of distributable - just like it is mentioned in this #5273 (comment). (Even though cloning the source repo and installing works). dist installation will trigger following error as the installation is looking for absolute paths local to the system which generated the distributable:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:
currently the submodules are provided as relative path dependencies in pyproject.toml as below; is there any alternate approach available for this scenario to facilitate dist installation in external systems?
Impact:
for projects with sub packages such as those with git submodules, distributable installation will not be possible in any other external systems.
The text was updated successfully, but these errors were encountered: