-
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 fails building flat directory hierarchy #2591
Comments
Rebuilt with poetry 1.1.0a1
Building with poetry 1.1.0a1 yields a different error. It looks like poetry does not correctly handle ..-indirection.
|
Hello @saver-r, may I ask you why you want to have this folder structure? It is intended that the With a folder structure like this:
with this in the
and a default
you can run the code snippet you've shown. fin swimmer |
Thanks for you question. Let me elaborate on the rationale. OverviewThis module is part of a large multi-language project whose directory hierarchy is preset.
Then we attempted to replace setup.py hell with declarative pyproject.toml files and poetry as the build system. GoalEach ImpedimentsI know perfectly well the recommended module layout you described. Using this layout, poetry works as intended. However, having to alter the directory layout in For intra-project access the modules Current workflow
Only one Workflow changes on directory structure changePretended we changed the directory structure to the poetry-suggested default:
This will inflict one of two changes to the workflow of which both are non favourable. Workflow change 1: Use pypi-modules
This is an undue complication of our local hack-build-test cycle not well supported by IDEs and therefore not acceptable. Additionally it litters the private pypi-repository with transient development versions of packages that are of no use except for an individual developer's hack-build-test cycle. Workflow change 2: Keep amending PYTHON_PATH
If no module is added, workflow remains the same as initially depicted. One might naively think, there's no problem in a change of workflow if the change is only rarely to be regarded. However, this is actually the biggest impediment. If the developer is used to the simple workflow, and only on rare occations, he has to use another workflow, guess which workflow the developer will forget to apply. Now you will think: "Bah! Amending the PYTHON_PATH only takes one minute!" Experience tells that if you think some action takes one minute, it actually takes five minutes to deal with dependent side-actions not duely considered before. To make matters worse, amending We make software for a living and strive to keep development workflows lean and efficient. Therefore, we cannot introduce exceptions to the current workflow. Wrap uppoetry is a very promising tool we'd really like to replace our setup.py hell with. From my point of view, it looks like poetry already provides the basis to support the current workflow of using a flat hierarchy. poetry supports
What's missing?
E.g. poetry could be able support a layout like this:
With
Up to here, poetry already supports specifying sources and excludes like denoted above. The resulting tar.gz should have a directory layout like this:
This is where poetry currently fails, but it looks like it could be easily solved by properly resolving indirect paths. |
Same problem here. I want to use a dependency that is in
of a remote git repository. And I don't control that project. As it stands,
|
@dmvianna your issue is unrelated and will be solved by #5811. As to the original ask here, it's actually relative path includes. I couldn't find a more general issue, but #4583 is a better blanket for this feature anyway as the semantics of what you want to achieve here is a bit blurry on interaction with other features/aspects of Poetry. |
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. |
-vvv
option).Issue
Im trying to make poetry work on a flat hierarchy, i.e. on a directory tree that does not contain a package subdirectory. I looked for duplicates and found #92 (Poetry build can't find source files) but #92 refers to an alternative src/-subdirectory while we strive for a flat directory structure (no subdirectory).
It is intended to be imported like this:
Setup
Build it
Expected result
Should create a dist/test_flat-0.1.0.tar.gz and a wheel file and should report no errors.
Actual result
Creates garbled tar.gz:
Fails at creating wheel-file.
The text was updated successfully, but these errors were encountered: