strawberry-graphql / strawberry

A GraphQL library for Python that leverages type annotations 🍓
https://strawberry.rocks
MIT License
4.04k stars 537 forks source link

Use `poetry-core` build backend rather `poetry` to reduce build dependencies #2497

Open codedawi opened 1 year ago

codedawi commented 1 year ago

Poetry recommends using poetry-core and specifically poetry.core.masonry.api as the build backend to reduce dependencies required for building package. See poetry documentation: https://python-poetry.org/docs/pyproject/#poetry-and-pep-517.

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

Please note functionality will not change as poetry.masonry.api simply imports peotry.core.masonry.api methods.

Upvote & Fund

Fund with Polar

g-as commented 1 year ago

See #2199

Secrus commented 2 months ago

Just FYI, it is recommended to migrate to poetry-core as the backend, since poetry doesn't expose build hooks for editable builds (unless using Poetry itself).