testing/py3-poetry-core: build using pyproject2setuppy
I was trying to create new APKBUILDs for other Python packages that used Poetry as their build backend, but got errors stating that poetry.core
was missing. It turns out that while py3-poetry-core
does build, it does not include any actual code, only some package metadata:
λ tar tf ~/packages/testing/x86_64/py3-poetry-core-1.0.7-r2.apk
.SIGN.RSA.lucidiot@brainshit.fr-61490981.rsa.pub
.PKGINFO
usr/
usr/lib/
usr/lib/python3.10/
usr/lib/python3.10/site-packages/
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/INSTALLER
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/LICENSE
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/METADATA
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/RECORD
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/REQUESTED
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/WHEEL
usr/lib/python3.10/site-packages/poetry_core-1.0.7.dist-info/direct_url.json
This seems to be caused by the fact that poetry-core uses itself as its own build backend, which does not play well with pip. I found 7dab99e5 which adds pyproject2setuppy on the poetry
package and applied it here, with much success.
λ tar tf ~/packages/testing/x86_64/py3-poetry-core-1.0.7-r3.apk
# ...
usr/lib/python3.10/site-packages/poetry/__init__.py
usr/lib/python3.10/site-packages/poetry/__pycache__/
usr/lib/python3.10/site-packages/poetry/__pycache__/__init__.cpython-310.pyc
# ...