-
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 install fails when tests are in a separate subdir from the main package #2450
Comments
I saw that there had been some changes in the develop branch to installing the root package. (Is that the right jargon for the package that I'm using poetry to build?) I installed the develop branch and gave this another try. The good news is that on the develop branch poetry install will complete. The bad news is that it doesn't install correctly. It seems that it still only knows about one of the
For this test case, the .pth file should contain Poetry commit hash on develop: abee30f |
By moving the tests into the subdirectory as well. Hold off on merging this, though, as the current code in what will be 1.1.0 can't seem to handle this either. python-poetry/poetry#2450 (comment)
When we define multiple packages from different source locations, Poetry currently only uses the last specified from=. This patch adds explicit paths to package_dir for any additional packages. This fixes python-poetry/poetry#1811, python-poetry/poetry#2354 And possibly python-poetry/poetry#2450
When we define multiple packages from different source locations, Poetry currently only uses the last specified from=. This patch adds explicit paths to package_dir for any additional packages. This fixes python-poetry/poetry#1811 python-poetry/poetry#2354 And possibly python-poetry/poetry#2450
When we define multiple packages from different source locations, Poetry currently only uses the last specified from= location. This patch adds explicit paths to package_dir for additional packages. This fixes python-poetry/poetry#1811, fixes python-poetry/poetry#2354, and possibly even python-poetry/poetry#2450.
When we define multiple packages from different source locations, Poetry currently only uses the last specified from= location. This patch adds explicit paths to package_dir for additional packages. This fixes python-poetry/poetry#1811, fixes python-poetry/poetry#2354, and possibly even python-poetry/poetry#2450.
When we define multiple packages from different source locations, Poetry currently only uses the last specified from= location. This patch adds explicit paths to package_dir for additional packages. This fixes python-poetry/poetry#1811, fixes python-poetry/poetry#2354, and possibly even python-poetry/poetry#2450.
* Fix for including modules from different locations When we define multiple packages from different source locations, Poetry currently only uses the last specified from= location. This patch adds explicit paths to package_dir for additional packages. This fixes python-poetry/poetry#1811, fixes python-poetry/poetry#2354, and possibly even python-poetry/poetry#2450. * Test the fix for including modules from different locations When we try to include moduleA from libA and moduleB from libB then package_dir in the generated setup.py must to contain either one or both `"moduleA": "libA/moduleA"` or `"moduleB": "libB/moduleB"` so we are able to find both modules when building the source dist. `ns["package_dir"].keys() == {"", "module_b"}` should always be true, so we don't have to test for module_a in `ns["package_dir"]`.
Hey @abadger -- would you be willing to try with the latest |
I'll try to give it a look this weekend
…On Tue, Nov 9, 2021, 10:05 PM Bjorn Neergaard ***@***.***> wrote:
I saw that there had been some changes in the develop branch to installing
the root package. (Is that the right jargon for the package that I'm using
poetry to build?) I installed the develop branch and gave this another try.
The good news is that on the develop branch poetry install will complete.
The bad news is that it doesn't install correctly. It seems that it still
only knows about one of the from entries in the package list. When it
installs, it creates a .pth file in the virtualenv. But it can contain the
wrong path:
$ cat /home/badger/.cache/pypoetry/virtualenvs/trees-qCG1GaiB-py3.8/lib/python3.8/site-packages/trees.pth
/var/tmp/trees
For this test case, the .pth file should contain /var/tmp/trees/src
Poetry commit hash on develop: abee30f
<abee30f>
Hey @abadger <https://github.com/abadger> -- would you be willing to try
with the latest poetry-core? I do believe that the from= issue should be
fixed and that hopefully will solve the second half of this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTCWRLGUXRBR2J3Z33H4TULIDTHANCNFSM4NG6IGIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
poetry has been split into poetry and poetry-core. The core is a small subset of functionality that is what is necessary to build python packages. Changing from poetry to poetry-core should improve the `pip install antsibull` experience since all of poetry and its dependencis won't be needed. The update to a newer version is also needed to solve: > python-poetry/poetry#2450 and allow us to put the source in a subdirectory
I have tested and it seems to work now! Thanks! |
poetry has been split into poetry and poetry-core. The core is a small subset of functionality that is what is necessary to build python packages. Changing from poetry to poetry-core should improve the `pip install antsibull` experience since all of poetry and its dependencis won't be needed. The update to a newer version is also needed to solve: > python-poetry/poetry#2450 and allow us to put the source in a subdirectory
* Use poetry-core as the build backend. poetry has been split into poetry and poetry-core. The core is a small subset of functionality that is what is necessary to build python packages. Changing from poetry to poetry-core should improve the `pip install antsibull` experience since all of poetry and its dependencis won't be needed. The update to a newer version is also needed to solve: > python-poetry/poetry#2450 and allow us to put the source in a subdirectory * Move source of ansibulled to a subdir. pyre prefers to be given the directory which holds your python package as the source-directory rather than the directory which is your python package. However, if the directory given is the toplevel, pyre tends to get slow for me. (I believe since it scans temporary directories that I have accumulated [downloads of all those ansible collections...]). Putting the source code in its own subdirectory is the way to fix that. * Change the source dir path in github workflows too
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
When a pyproject.toml has multiple
include
entries in thepackages
list and one of those entries is listed asformat='sdist'
, poetry will mistakenly try to install that package into the virtualenv when doingpoetry install
. In conjunction with: #1811 this will lead to a traceback.Reproducer:
Relevant portion of pyproject.toml from the reproducer tarball:
The problem is that poetry is generating a setup.py to be able to
pip install -e
. The setup.py entry forpackages
is wrong:In this case, because
{include="test"[..]}
hasformat="sdist"
,test
should not appear in thepackages
list.The text was updated successfully, but these errors were encountered: