From 3db4e7b296af571deba699260d3d8fa63b8ec1e7 Mon Sep 17 00:00:00 2001 From: ptrcnull <git@ptrcnull.me> Date: Sun, 13 Feb 2022 11:25:57 +0100 Subject: [PATCH] community/py3-poetry-core: build with py3-build --- community/py3-poetry-core/APKBUILD | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/community/py3-poetry-core/APKBUILD b/community/py3-poetry-core/APKBUILD index 5f3a5177aad3..7e5cc0447667 100644 --- a/community/py3-poetry-core/APKBUILD +++ b/community/py3-poetry-core/APKBUILD @@ -3,14 +3,14 @@ pkgname=py3-poetry-core _pkgname=poetry-core pkgver=1.0.7 -pkgrel=3 +pkgrel=4 pkgdesc="PEP 517 build backend implementation for Poetry" url="https://github.com/python-poetry/poetry-core" arch="noarch" license="MIT" depends="python3" -makedepends="pyproject2setuppy" -checkdepends="py3-pip py3-pytest py3-pytest-mock py3-virtualenv python3-dev" +makedepends="py3-build py3-pip" +checkdepends="py3-pytest py3-pytest-mock py3-virtualenv python3-dev" source="$_pkgname-$pkgver.tar.gz::https://github.com/python-poetry/poetry-core/archive/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -22,16 +22,20 @@ check() { } build() { - python3 -m pyproject2setuppy.main build + # poetry-core excludes files specified in .gitignore + # fixed by setting GIT_DIR away from the aports tree's top-level directory + GIT_DIR="$PWD" python3 -m build --no-isolation --skip-dependency-check --wheel } package() { - python3 -m pyproject2setuppy.main install \ - --prefix=/usr \ - --root="$pkgdir" \ - --skip-build - local sitedir=$(python3 -c "import site; print(site.getsitepackages()[0])") + + python3 -m pip install --root "$pkgdir" --no-deps --no-warn-script-location \ + dist/poetry_core-$pkgver-py2.py3-none-any.whl + + # remove vendored versions of installed modules + rm -r "$pkgdir/$sitedir"/poetry/core/_vendor + install -Dm644 poetry/core/json/schemas/poetry-schema.json \ "$pkgdir/$sitedir"/poetry/core/json/schemas/poetry-schema.json install -Dm644 poetry/core/spdx/data/licenses.json \ -- GitLab