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

🐛 [BUG] - Project doesnt build due to upstream issue with isort / poetry. #4

Closed
nyreed opened this issue Apr 30, 2023 · 0 comments · Fixed by #5
Closed

🐛 [BUG] - Project doesnt build due to upstream issue with isort / poetry. #4

nyreed opened this issue Apr 30, 2023 · 0 comments · Fixed by #5
Labels
bug Something isn't working

Comments

@nyreed
Copy link
Contributor

nyreed commented Apr 30, 2023

Description

Cannot build due to incompatibility between upstream isort update and breaking changes in poetry configuration.
This is impacting a lot of projects.

See PyCQA/isort#2083 (comment)

Fix is to run pre-commit auto-update in the setup.sh file.
I will create a PR for this small issue.

Reproduction steps

run ./scripts/setup.sh as instructed in install.

Expected behaviour: project builds.

Logs

Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 attrs-23.1.0 certifi-2022.12.7 cfgv-3.3.1 charset-normalizer-3.1.0 click-8.1.3 distlib-0.3.6 filelock-3.12.0 frozenlist-1.3.3 identify-2.5.23 idna-3.4 multidict-6.0.4 nodeenv-1.7.0 openai-0.27.5 platformdirs-3.5.0 pre-commit-3.2.2 pyyaml-6.0 requests-2.29.0 tqdm-4.65.0 urllib3-1.26.15 virtualenv-20.23.0 yarl-1.9.2
pre-commit installed at .git/hooks/pre-commit
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/Users/brand/.cache/pre-commit/repocydpt8qy/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /Users/brand/.cache/pre-commit/repocydpt8qy
      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 metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
      error: subprocess-exited-with-error

      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [17 lines of output]
          Traceback (most recent call last):
            File "/Users/brand/.cache/pre-commit/repocydpt8qy/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
              main()
            File "/Users/brand/.cache/pre-commit/repocydpt8qy/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/Users/brand/.cache/pre-commit/repocydpt8qy/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
              return hook(metadata_directory, config_settings)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/var/folders/s1/jbydn_pn0mn2x0qqqfcvzddw0000gn/T/pip-build-env-0x6uaksp/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 40, in prepare_metadata_for_build_wheel
              poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/var/folders/s1/jbydn_pn0mn2x0qqqfcvzddw0000gn/T/pip-build-env-0x6uaksp/overlay/lib/python3.11/site-packages/poetry/core/factory.py", line 57, in create_poetry
              raise RuntimeError("The Poetry configuration is invalid:\n" + message)
          RuntimeError: The Poetry configuration is invalid:
            - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    × Encountered error while generating package metadata.
    ╰─> See above for output.

OS

Mac

OS Version

System: MacOS 12.6.5 (Monterey) - ARM64.
Python 3.11.2 (homebrew, ARM64)
pip 23.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant