aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2022-04-08 01:27:44 +0000
committeralice <alice@ayaya.dev>2022-04-08 10:01:55 +0000
commit57219f23efe237018c8e08a1f8c0ff1a75945aa7 (patch)
tree5617b798ef8404db02730ee4071621ec20e2adea
parent379e2ccc1d9553162999a81e50a754116f32912a (diff)
downloadaports-57219f23efe237018c8e08a1f8c0ff1a75945aa7.tar.gz
aports-57219f23efe237018c8e08a1f8c0ff1a75945aa7.tar.bz2
aports-57219f23efe237018c8e08a1f8c0ff1a75945aa7.tar.xz
community/py3-tinycss2: build with py3-build
-rw-r--r--community/py3-tinycss2/APKBUILD15
1 files changed, 9 insertions, 6 deletions
diff --git a/community/py3-tinycss2/APKBUILD b/community/py3-tinycss2/APKBUILD
index 38f99ac6fa..8b0ed8c552 100644
--- a/community/py3-tinycss2/APKBUILD
+++ b/community/py3-tinycss2/APKBUILD
@@ -3,34 +3,37 @@
pkgname=py3-tinycss2
_pyname=tinycss2
pkgver=1.1.1
-pkgrel=0
+pkgrel=1
pkgdesc="Low-level CSS parser for Python"
url="https://pypi.python.org/pypi/tinycss2"
arch="noarch"
license="BSD-3-Clause"
depends="py3-webencodings"
checkdepends="py3-pytest py3-pytest-flake8 py3-pytest-isort py3-pytest-cov"
-makedepends="python3-dev py3-setuptools pyproject2setuppy"
+makedepends="py3-build py3-flit py3-installer py3-wheel"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
replaces="py-tinycss py2-tinycss py3-tinycss"
prepare() {
+ default_prepare
sed -i pyproject.toml -e 's/--isort //'
}
build() {
- python3 -m pyproject2setuppy.main build
+ python3 -m build --no-isolation --wheel
}
check() {
- export PYTHONPATH="$builddir"
- pytest
+ python3 -m installer -d testenv \
+ dist/tinycss2-$pkgver-py3-none-any.whl
+ local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
+ PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest
}
package() {
- python3 -m pyproject2setuppy.main install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" dist/tinycss2-$pkgver-py3-none-any.whl
}
sha512sums="