summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30253975075247e99288f662faebaa40d9d61dcb (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Filipe Nascimento <flipee at tuta dot io>
# Contributor: Simon Doppler <dop dot simon at gmail dot com>
pkgname=python-colored
_name=${pkgname#python-}
pkgver=2.3.2
pkgrel=1
pkgdesc="Simple python library for color and formatting to terminal"
arch=('any')
url="https://dslackw.gitlab.io/colored"
license=('MIT')
depends=('python')
makedepends=(
  'python-build'
  'python-flit'
  'python-installer'
  'python-wheel'
)
checkdepends=('python-pytest')
source=("https://gitlab.com/dslackw/colored/-/archive/$pkgver/$_name-$pkgver.tar.gz")
sha256sums=('0eceada151aceac9197b783f1825a6c41115c7a39ab9e200e45d8e928b74e798')

prepare() {
  cd "$_name-$pkgver"

  # remove shebangs
  sed -i '/#!\/usr\/bin\/env python/d' "$_name"/*.py
}

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation
}

check() {
  cd "$_name-$pkgver"
  pytest
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
}