Skip to content

Commit

Permalink
fix: Update build-system.build-backend
Browse files Browse the repository at this point in the history
refs https://python-poetry.org/docs/pyproject#poetry-and-pep-517

Fixes an error encountered when trying to add a local version of this package as an editable dependency to another local project:

```
poetry add -e <path-to-repo>
...

 ChefBuildError

  Backend operation failed: HookMissing('build_editable')

  at ~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/poetry/installation/chef.py:147 in _prepare
      143│
      144│                 error = ChefBuildError("\n\n".join(message_parts))
      145│
      146│             if error is not None:
    → 147│                 raise error from None
      148│
      149│             return path
      150│
      151│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with strawberry-django-auth (0.376.4 ~/repos/strawberry-django-auth) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 --editable "/Users/jwegner/Data/development/repos/jacobwegner/strawberry-django-auth"'.
```

refs python-poetry/poetry#7583 (comment)
  • Loading branch information
jacobwegner committed Jan 8, 2024
1 parent 0f3744a commit 2769a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ ignore_missing_imports = "True"
django_settings_module = "testproject.settings"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.autopub]
git-username = "gqlauth-bot"
Expand Down

0 comments on commit 2769a7e

Please sign in to comment.