summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 87ccd4c765f07ed9f8ab24c1e8a290bca9384b81 (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
62
63
64
65
66
67
#  Maintainer: Blair Bonnett <blair dot bonnett at gmail>
# Contributor: Clayton Craft <clayton@craftyguy.net>

pkgname=python-pudb-git
_pkgname=pudb
pkgver=2024.1.3.r0.gf0b2aa5
pkgrel=1
pkgdesc="A full-screen, console-based Python debugger"
url="https://documen.tician.de/pudb/"
arch=('any')
license=('MIT')
provides=('python-pudb')
conflicts=('python-pudb')

depends=(
  'python-jedi'
  'python-packaging'
  'python-pygments'
  'python-urwid'
  'python-urwid_readline'
)
makedepends=(
  'git'
  'python-build'
  'python-hatchling'
  'python-installer'
)
checkdepends=(
  'python-pytest'
  'python-pytest-mock'
)
optdepends=(
  'bpython: bpython shell'
  'ptpython: shell based on prompt_toolkit'
  'ipython: shell embedding IPython'
)

source=("git+https://github.com/inducer/pudb.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir"/"$_pkgname"
  git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir"/"$_pkgname"
  python -m build --no-isolation --wheel
}

check() {
  cd "$srcdir/$_pkgname"
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest -v
}

package() {
  cd "$srcdir"/"$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  rm -r "$pkgdir/$site_packages/pudb/test"
}

# vim: set ft=sh ts=2 sw=2 et: