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

dependencies of local dependencies are not installed #5300

Closed
3 tasks done
GerevSec opened this issue Mar 11, 2022 · 9 comments
Closed
3 tasks done

dependencies of local dependencies are not installed #5300

GerevSec opened this issue Mar 11, 2022 · 9 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@GerevSec
Copy link

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • Windows 11 WSL2 ubuntu 20.04 python 3.10

  • master (6485bc2)

  • pyproject.toml

Issue

Hey guys,

After using the current master branch in order to access the 1.2 preview features, I notice that when installing a package (in this case, "X") using a local package "pylib", the dependencies of the local package are not installed.
In this case, pylib uses grpcio-tools (with protobuf) to create some python grpc files that use google.protobuf.
X uses pylib, so it needs grpcio-tools/protobuf installed.
however, installing X after a fresh clone does not install protobuf or grpcio-tools.

How do you suggest to proceed?

Cheers,
Ayal

@GerevSec GerevSec added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 11, 2022
@GerevSec
Copy link
Author

Actually, any time a new venv is created (after every restart/whatever) there's a need to install the 2 packages separately. What do you suggest?

@GerevSec
Copy link
Author

Expanding on this -

Even installing both packages separately doesn't solve the issue.
Each package receives a separate venv, meaning that package X's venv never has grpcio-tools/protobuf packages needed to run pylib's code.

Thoughts?

@abn
Copy link
Member

abn commented Mar 11, 2022

@GerevSec can you try the following from outside the project virtual environment?

pip install build
python -c "import build.util; print(build.util.project_wheel_metadata('../../libraries/python/pylib'))"

This should show the wheel metadata generated for the project pylib. You can grep for Requires-Dist to filter for the relevant bits.

Additionally, using poetry show --tree should list the dependencies as identified by Poetry. It would also be useful if you can provide the output of poetry lock -vvv should also provide more insight on what is going on.

Another note; it could also be that grpcio-tools tools might be part of an extra, eg: pylib[compiler]. etc.

@GerevSec
Copy link
Author

Hey @abn, Thanks for the response.

So running it outside of the venv, I'm getting an error with the venv -
`python -c "import build.util; print(build.util.project_wheel_metadata('../../libraries/python/pylib'))"

Traceback (most recent call last):
File "", line 1, in
File "/home/gerev/.local/lib/python3.10/site-packages/build/util.py", line 52, in project_wheel_metadata
with build.env.IsolatedEnvBuilder() as env:
File "/home/gerev/.local/lib/python3.10/site-packages/build/env.py", line 104, in enter
executable, scripts_dir = _create_isolated_env_venv(self._path)
File "/home/gerev/.local/lib/python3.10/site-packages/build/env.py", line 258, in _create_isolated_env_venv
executable, script_dir, purelib = _find_executable_and_scripts(path)
File "/home/gerev/.local/lib/python3.10/site-packages/build/env.py", line 303, in _find_executable_and_scripts
raise RuntimeError(f'Virtual environment creation failed, executable {executable} missing')
RuntimeError: Virtual environment creation failed, executable /tmp/build-env-8qe2u2wg/local/bin/python missing`

am I missing something here?

@abn
Copy link
Member

abn commented Mar 22, 2022

Hmm, unsure. Looks like the issue is that the build package is unable to create the isolatd build environment. I suspect the issue is pypa/build#433.

See also pypa/virtualenv#2319 (comment).

@abn
Copy link
Member

abn commented Mar 22, 2022

This might warrant some additional investigation.

@finswimmer
Copy link
Member

Hello @GerevSec,

you haven't come back to this issue for a long while. So I assume this is solved in the meantime and I can close this ticket.

Feel free to leave a comment if you disagree.

fin swimmer

@after-ephemera
Copy link

I ran into this issue recently and resolved it by removing the develop = true flag for my local dependency.

Copy link

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants