summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c7d593326b1b3e8a0f9c24a5cf43adee7bc171f4 (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
# -*- sh -*-

#  Maintainer: Klaus Alexander Seistrup <$(echo 0x1fd+d59decfa=40 | tr 0-9+a-f=x ka-i@p-u.l)>
# Contributor: Alex Avance <aravance at gmail dot com>

_pkgname=sparklines
pkgname="python-$_pkgname"
pkgver=0.5.0
pkgrel=3
pkgdesc='Text-based sparkline command line mimicking those of Edward Tufte'
arch=('any')
url="https://github.com/deeplook/$_pkgname"
license=('GPL-3.0-or-later')  # SPDX-License-Identifier: GPL-3.0-or-later
depends=(
  'python'
  'python-termcolor'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
)
source=(
  "https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
)
sha256sums=(
  '069e48633fc1af354e9bbdfd0a644c1279d6632a572446aa9d741105f1177000'
)
provides=("$pkgname" "$_pkgname")
conflicts=("$_pkgname")
changelog="$pkgname.changelog"

build() {
  cd "${_pkgname}-$pkgver"

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

package() {
  cd "${_pkgname}-$pkgver"

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

  _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  rm -vrf "$pkgdir$_site_packages/tests"

  install -vDm0644 -t "$pkgdir/usr/share/doc/$pkgname" \
    CONTRIBUTORS.txt README.rst
}

# eof