poetry: Could not build wheels for XXX which use PEP 517
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- OS version and name: macOS 10.15
- Poetry version: 1.0.0b4
Issue
#11 provides a workaround for custom build systems (e.g., Cython extensions) that works well with poetry. However, when you try to do pip install .
on a project that has a custom build.py
the build process fails with
ERROR: Could not build wheels for seiya which use PEP 517 and cannot be installed directly
This means, among other things, that one cannot use ReadTheDocs to document the code. This happens with my code but I have also tested it with pendulum.
Is there a workaround for this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (3 by maintainers)
Commits related to this issue
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to abn/poetry-core by abn 4 years ago
- Fix PEP-517 issues for projects using build scripts Resolves: python-poetry/poetry#1516 — committed to python-poetry/poetry-core by abn 4 years ago
Doing some more Googling on this I came up with the solution described here. One can create a
setup.py
file such asand remove the need of using
build.py
. As far as I can see this works fine (even allows editable installs!). When you dopoetry install
it creates anUNKNOWN.egg-info
directory withPKG-INFO
in which all the fields areUNKNOWN
. That does not seem to affect poetry but I’m not sure what will happen when you build a distribution (I have runpoetry build
and the results look ok, with the correct metadata, but I haven’t tested it all the way by uploading it to PyPI and installing from a fresh environment).IMHO poetry really needs to define a way to deal with extensions. There are many projects that depend on a custom build system and this kind of workarounds are getting old …
I use python 3.8.0, and this problem still occurs
Thanks @abn for fixing this. However, I cannot completely make it work. If I add
to my
pyproject.toml
it fails withHowever, if I do
Then it works. Is this expected and if so, should the build-system documentation be updated?
I’m running this on a virtual environment using pyenv with Python 3.8.2. Note that the virtual environment has setuptools installed but that doesn’t seem to make a difference.