summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59ed482f18c33eecc972720b8e23dbd3b43f6cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=python-refurb
pkgver=1.11.1
pkgrel=1
pkgdesc='A tool for refurbishing and modernizing Python codebases'
arch=('any')
url='https://github.com/dosisod/refurb'
license=('GPL3')
depends=(
  'python'
  'mypy'
  'python-tomli'
)
makedepends=(
  'git'
  'python-build'
  'python-poetry-core'
  'python-installer'
  'python-wheel'
)
checkdepends=('python-pytest')
_commit='604c9677aac16596d4878530e533216e6d341323'
source=(
  "$pkgname::git+$url#commit=$_commit"
  'skip-coverage-report.patch'
)
b2sums=('SKIP'
        '89f67f2799c5d2207158cb79113cd425156abf1ba53ec6e4d60cb0eae2fc1a942849a5bee020bfbf1c2b34e7489e659baa4bb69ed0cf50b7a9d67129685069c5')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

prepare() {
  cd "$pkgname"

  # don't need coverage report, so skip it
  patch -p1 -i "$srcdir/skip-coverage-report.patch"
}

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

check() {
  cd "$pkgname"

  # NOTE: test_checks() from test/test_checks.py takes a while to run
  pytest
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}