summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2022-04-01 11:01:12 +0000
committerGeorge Rawlinson2022-04-01 11:01:12 +0000
commit454dcd2cdff6af2f986abe40a36418abe5c0f50d (patch)
tree7ce92013d11fb2b79849a20efd07922d4d5f1335
parent5cba80c3b1321c31cb983f6ed5ddbc2a7bdaf7c7 (diff)
downloadaur-454dcd2cdff6af2f986abe40a36418abe5c0f50d.tar.gz
upgpkg: python-flake8-annotations 2.8.0-1
* New upstream release. * Switch source to git commit from github tarball. * Switch build system to build/installer from dephell/setuptools.
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD58
2 files changed, 44 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3f095944b169..3b6cdf74b1c0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = python-flake8-annotations
pkgdesc = A flake8 extension that checks type annotations
- pkgver = 2.7.0
- pkgrel = 2
+ pkgver = 2.8.0
+ pkgrel = 1
url = https://github.com/sco1/flake8-annotations
arch = any
license = MIT
checkdepends = python-pytest
checkdepends = python-pytest-check
checkdepends = python-pytest-cov
- makedepends = python-setuptools
- makedepends = python-dephell
+ makedepends = git
+ makedepends = python-build
+ makedepends = python-poetry-core
+ makedepends = python-installer
depends = python
depends = flake8
- source = python-flake8-annotations-2.7.0.tar.gz::https://github.com/sco1/flake8-annotations/archive/v2.7.0.tar.gz
- b2sums = a48e9a7d6e7c44c52eeff7328c089bc5f15adde3bdd59394e8ad8313c53eced287858d8e3adcea8bf1147b9e37bf8a354ef8d92aa21cad0882d7d49d610a8ab4
+ source = python-flake8-annotations::git+https://github.com/sco1/flake8-annotations.git#commit=a969176181f4b911fc2881e143a27e293b43de73
+ b2sums = SKIP
pkgname = python-flake8-annotations
diff --git a/PKGBUILD b/PKGBUILD
index 5a1c4a5c8c1d..abc47b4c2f44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,57 @@
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
pkgname=python-flake8-annotations
-_pkgname="${pkgname#python-}"
-_name="${_pkgname/-/_}"
-pkgver=2.7.0
-pkgrel=2
+pkgver=2.8.0
+pkgrel=1
pkgdesc="A flake8 extension that checks type annotations"
arch=('any')
url="https://github.com/sco1/flake8-annotations"
license=('MIT')
depends=('python' 'flake8')
-makedepends=('python-setuptools' 'python-dephell')
-checkdepends=('python-pytest' 'python-pytest-check' 'python-pytest-cov')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-b2sums=('a48e9a7d6e7c44c52eeff7328c089bc5f15adde3bdd59394e8ad8313c53eced287858d8e3adcea8bf1147b9e37bf8a354ef8d92aa21cad0882d7d49d610a8ab4')
-
-prepare() {
- cd "$_pkgname-$pkgver"
- dephell deps convert --from pyproject.toml --to setup.py
+makedepends=(
+ 'git'
+ 'python-build'
+ 'python-poetry-core'
+ 'python-installer'
+)
+checkdepends=(
+ 'python-pytest'
+ 'python-pytest-check'
+ 'python-pytest-cov'
+)
+_commit='a969176181f4b911fc2881e143a27e293b43de73'
+source=("$pkgname::git+$url.git#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed 's/^v//'
}
build() {
- cd "$_pkgname-$pkgver"
- python setup.py build
+ cd "$pkgname"
+
+ python -m build \
+ --wheel \
+ --no-isolation
}
check() {
- cd "$_pkgname-$pkgver"
- pytest --ignore testing/test_flake8_actually_runs_checker.py .
+ cd "$pkgname"
+
+ pytest \
+ --deselect testing/test_flake8_actually_runs_checker.py::test_checker_runs \
+ --deselect testing/test_opinionated_any.py::test_ANN401_fire_when_selected
}
package() {
- cd "$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ cd "$pkgname"
+
+ python -m installer \
+ --destdir="$pkgdir" \
+ dist/*.whl
# license
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
-
- # delete tests folder
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- rm -rf "$pkgdir/$site_packages/testing"
}