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

Nested relative directory dependency failing to resolve. #3098

Closed
3 tasks done
goofiva opened this issue Oct 6, 2020 · 10 comments
Closed
3 tasks done

Nested relative directory dependency failing to resolve. #3098

goofiva opened this issue Oct 6, 2020 · 10 comments
Labels
kind/bug Something isn't working as expected

Comments

@goofiva
Copy link

goofiva commented Oct 6, 2020

  • 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).

Issue

I'm having trouble installing complex (but not circular) nested relative dependencies.

This was working in poetry v1.0.5.

Please see this public repo for replicating this error.

https://github.com/goofiva/poetry-directory-dependency

➜  package-a git:(main) ✗ poetry install -vvv
Creating virtualenv package-a-iE34YiwS-py3.9 in /Users/va/Library/Caches/pypoetry/virtualenvs
Using virtualenv: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9
Installing dependencies from lock file

Finding the necessary packages for the current system

Package operations: 3 installs, 0 updates, 0 removals

  • Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c): Pending...
  • Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c): Building...
  • Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c)
  • Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Pending...
  • Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Building...
  • Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Failed

  EnvCommandError

  Command ['/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/pip', 'install', '--no-deps', '-U', '/Users/va/wp/poetry_dependency_bug/package-b'] errored with the following return code 1, and output:
  Processing /Users/va/wp/poetry_dependency_bug/package-b
    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'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/tmpea5bsf0z
           cwd: /private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-req-build-2mbl5clu
      Complete output (16 lines):
      Traceback (most recent call last):
        File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
          main()
        File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 34, in prepare_metadata_for_build_wheel
          poetry = Factory().create_poetry(Path(".").resolve())
        File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/factory.py", line 91, in create_poetry
          self.create_dependency(name, constraint, root_dir=package.root_dir)
        File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/factory.py", line 242, in create_dependency
          dependency = DirectoryDependency(
        File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/packages/directory_dependency.py", line 36, in __init__
          raise ValueError("Directory {} does not exist".format(self._path))
      ValueError: Directory ../package-c does not exist
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/tmpea5bsf0z Check the logs for full command output.
  WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
  You should consider upgrading via the '/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python -m pip install --upgrade pip' command.


  at ~/.poetry/lib/poetry/utils/env.py:948 in _run
       944│                 output = subprocess.check_output(
       945│                     cmd, stderr=subprocess.STDOUT, **kwargs
       946│                 )
       947│         except CalledProcessError as e:
    →  948│             raise EnvCommandError(e, input=input_)
       949│
       950│         return decode(output)
       951│
       952│     def execute(self, bin, *args, **kwargs):
@goofiva goofiva added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 6, 2020
@ginty
Copy link

ginty commented Oct 6, 2020

I think this may be because you now need to add develop = true to path dependencies, see #3062

@goofiva
Copy link
Author

goofiva commented Oct 6, 2020

😑 I could have sworn I did a thorough search for your ticket... Thanks @ginty! 😅

@goofiva goofiva closed this as completed Oct 6, 2020
@ginty
Copy link

ginty commented Oct 6, 2020

No probs @goofiva.
Btw, interested to hear if you see development dependencies actually working or not? While this did solve the same installation error for me, I now see that when I edit the source code of such a dependency it does not get updated in the parent app.
I opened this ticket for it - #3096
Cheers!

@goofiva
Copy link
Author

goofiva commented Oct 6, 2020

@ginty I am seeing the same thing as #3096 as well. Furthermore... I may have spoken too soon with this ticket I made here too. Not sure how to describe this issue I'm having just yet.

@goofiva
Copy link
Author

goofiva commented Oct 6, 2020

I bumped into this error when the dependencies are a bit more complex, see this public repo for details.

https://github.com/goofiva/poetry-directory-dependency

@goofiva goofiva reopened this Oct 6, 2020
@lig
Copy link

lig commented Oct 6, 2020

Looks related to #3030

abn added a commit to abn/poetry that referenced this issue Oct 6, 2020
This change ensures that package inspection will handle rich core
metadata available for poetry managed projects. This will allow, nested
local path dependencies to use "develop" mode packages.

Resolves: python-poetry#3098
abn added a commit to abn/poetry that referenced this issue Oct 6, 2020
This change ensures that package inspection will handle rich core
metadata available for poetry managed projects. This will allow, nested
local path dependencies to use "develop" mode packages.

Resolves: python-poetry#3098
finswimmer pushed a commit that referenced this issue Oct 6, 2020
This change ensures that package inspection will handle rich core
metadata available for poetry managed projects. This will allow, nested
local path dependencies to use "develop" mode packages.

Resolves: #3098
abn added a commit to abn/poetry that referenced this issue Oct 6, 2020
This change ensures that package inspection will handle rich core
metadata available for poetry managed projects. This will allow, nested
local path dependencies to use "develop" mode packages.

Resolves: python-poetry#3098
@goofiva
Copy link
Author

goofiva commented Oct 6, 2020

@ginty I built and installed this commit... 8acbd03 Worked out with #3096 as well.

@abn
Copy link
Member

abn commented Oct 6, 2020

@goofiva 1.1.2 is now out with this fix.

@goofiva
Copy link
Author

goofiva commented Oct 6, 2020

@goofiva 1.1.2 is now out with this fix.

@abn, Thanks a BUNCH! ❤️

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 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 2, 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

4 participants