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

relative sub-dependencies break parent poetry-install #1315

Closed
3 tasks done
micimize opened this issue Aug 22, 2019 · 4 comments
Closed
3 tasks done

relative sub-dependencies break parent poetry-install #1315

micimize opened this issue Aug 22, 2019 · 4 comments
Labels
kind/bug Something isn't working as expected

Comments

@micimize
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).

  • OS version and name: macOS + 10.14.5

  • Poetry version: 1.0.0b1 (get_poetry.py script)

Issue

With this relative dependency graph:

     parent-package
       /        \
dependency-a    dependency-b
       \        /
       common-lib

I get an EnvCommandError with the salient line:

Could not find a version that satisfies the requirement common-lib (from versions: )
[EnvCommandError]
Command ['/.../parent-package/.venv/bin/python', '-m', 'pip', 'install', '--no-deps', '-U', '-e', '/.../dependency-a'] errored with the following return code 1, and output:
Obtaining file:///.../dependency-a
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'error'
  Complete output from command /.../parent-package/.venv/bin/python /.../parent-package/.venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/1_/drxyjr152tvfmv8jp80hyzrw0000gp/T/pip-build-env-ngjdr72c/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- click>=6.7,<7.0 common-lib strict-rfc3339>=0.7.0,<0.8.0 pytz>=2018.7,<2019.0 dataflows>=0.0.37,<0.0.38 jsonschema-extractor>=0.8.1,<0.9.0 csv-diff>=0.5.1,<0.6.0:
  Collecting click<7.0,>=6.7
    Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
  Collecting common-lib
    Could not find a version that satisfies the requirement common-lib (from versions: )
  No matching distribution found for common-lib
  You are using pip version 19.0.3, however version 19.2.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.

  ----------------------------------------
Command "/.../parent-package/.venv/bin/python /.../parent-package/.venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/1_/drxyjr152tvfmv8jp80hyzrw0000gp/T/pip-build-env-ngjdr72c/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- click>=6.7,<7.0 common-lib strict-rfc3339>=0.7.0,<0.8.0 pytz>=2018.7,<2019.0 dataflows>=0.0.37,<0.0.38 jsonschema-extractor>=0.8.1,<0.9.0 csv-diff>=0.5.1,<0.6.0" failed with error code 1 in None
You are using pip version 19.0.3, however version 19.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

So while the root cause of the similar issue #1123 seems to be fixed, I am still unable to use poetry install in the same setup without commenting out [build-system]. The issue is now something to do with version resolution. Troubleshooting I tried to do:

  • deleting *.egg-info, pip-wheel-metadata, .venv, poetry.lock
  • using absolute paths for the nested dependency
  • removing the nested dependency from the parent pyproject.toml
parent pyproject.toml
[tool.poetry]
name = "parent-package"
packages = [{ include = "parent" }]
version = "0.1.0"

[tool.poetry.dependencies]
python = "^3.7"
# both dependencies depend on ../common-lib
dependency-a = {path = "../dependency-a"}
dependency-b = {path = "../dependency-b"}

[build-system]
requires = ["poetry>=1.0.0b1"]
build-backend = "poetry.masonry.api"
dependency pyproject.toml
[tool.poetry]
name = "dependency-a"
packages = [{ include = "dependency_a" }]
version = "0.1.0"

[tool.poetry.dependencies]
python = "^3.7"
common-lib = {path = "../common-lib"}

[build-system]
requires = ["poetry>=1.0.0b1"]
build-backend = "poetry.masonry.api"
@stale
Copy link

stale bot commented Nov 13, 2019

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.

@stale stale bot added the stale label Nov 13, 2019
@micimize
Copy link
Author

will test the latest later

@stale stale bot removed the stale label Nov 13, 2019
@finswimmer
Copy link
Member

Hello @micimize,

this seems to be fixed in the meantime. Most likely by #1875.

fin swimmer

Copy link

github-actions bot commented Mar 3, 2024

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 Mar 3, 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
Projects
None yet
Development

No branches or pull requests

3 participants