Poetry install fails with ChefBuildError: Backend operation failed: HookMissing('build_editable')
My poetry version is 1.4.2
This worked for me
I believe this is caused by a change to how the build-backend is defined in the pyproject.toml between poetry ^1.3 and poetry ^1.4. Assuming you have poetry ^1.4 installed you have two options:
In your pyproject.toml change build-backend = "poetry.masonry.api" to build-backend = "poetry.core.masonry.api"
If, like me you have other code the assumes poetry ^1.3 then simply downgrade you poetry version poetry self update 1.3.2
If you go with option 2 you may get a bunch of RuntimeError hash for xxx errors. If that's the case you will also need to rm -r ~/.cache/pypoetry/artifacts and rm -r ~/.cache/pypoetry/cache.
Does your project name differ from your src directory?
e.g. project name is py-project and src dir is scripts, then
try adding
packages = [{include = "scripts"}]
to your pyproject.toml
[tool.poetry]
name = "py-project"
...
packages = [{include = "scripts"}]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With