aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-isort/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-isort/APKBUILD')
-rw-r--r--community/py3-isort/APKBUILD47
1 files changed, 32 insertions, 15 deletions
diff --git a/community/py3-isort/APKBUILD b/community/py3-isort/APKBUILD
index 20733a9a446..9532f546212 100644
--- a/community/py3-isort/APKBUILD
+++ b/community/py3-isort/APKBUILD
@@ -1,35 +1,52 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-isort
-_pkgname=isort
-pkgver=4.3.21.2
-_tag=${pkgver%.*}-2
-pkgrel=3
+pkgver=5.13.2
+pkgrel=1
pkgdesc="Python library to sort Python imports"
-url="https://github.com/timothycrosley/isort"
+url="https://github.com/PyCQA/isort"
arch="noarch"
license="MIT"
-# 3 out of 111 tests are failing. Needs upstream fix.
-options="!check"
depends="python3"
-makedepends="py3-setuptools"
-checkdepends="py3-pytest"
-source="$pkgname-$_tag.tar.gz::https://github.com/timothycrosley/isort/archive/$_tag.tar.gz"
-builddir="$srcdir"/$_pkgname-$_tag
+makedepends="
+ py3-gpep517
+ py3-poetry-core
+ "
+checkdepends="
+ black
+ py3-hypothesis
+ py3-pytest
+ py3-colorama
+ "
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/PyCQA/isort/archive/refs/tags/$pkgver.tar.gz"
+builddir="$srcdir/isort-$pkgver"
+options="!check" # tests git clone random stuff
replaces="py-isort" # Backwards compatibility
provides="py-isort=$pkgver-r$pkgrel" # Backwards compatibility
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- pytest-3 test_isort.py
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer \
+ .dist/*.whl
+ # Ignored tests have unmet dependencies
+ .testenv/bin/python3 -m pytest \
+ --ignore tests/unit/test_pylama_isort.py \
+ --ignore tests/integration/test_hypothesmith.py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="fc2aa00c87196864864d2516b8be7acdedcf40d71d1931510e4b878dbd2b6da0b579661b50221f03f4aa5560c8bf23d5e1e10a2694d2b741ca09a92e40a4c687 py3-isort-4.3.21-2.tar.gz"
+sha512sums="
+fe2bd27f0aa6219d44c3124782d400338a801a911d6a09ad51e7f80cbcbce250838350ad6cc80a35f641e0a319778ddcfb4dc61c8c76999ebc63a5147953e378 py3-isort-5.13.2.tar.gz
+"