~sircmpwn/sr.ht-pkgbuilds

ref: f6f509861162091ec4764c075bf9bd24924d3ded sr.ht-pkgbuilds/python-emailthreads/PKGBUILD -rw-r--r-- 940 bytes
f6f50986Eli Schwartz pkgrel bump all remaining packages that still need to be rebuilt for py3.10 10 months ago
                                                                                
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
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=python-emailthreads
_pkgname=emailthreads
pkgver=0.1.3
pkgrel=2
pkgdesc='Python library to parse and format email threads'
arch=(any)
url=https://github.com/emersion/python-emailthreads
license=('MIT')
depends=('python')
makedepends=(python-setuptools)
checkdepends=('python-pytest')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/emersion/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('c315384b3f674c2b53acbe0a7a40326e26cf9b7efdc2721356bc9ba5f4f001d9')

# broken setup.py assumes git is installed to get version info
export PKGVER=$pkgver

build() {
  cd "${srcdir}"/${pkgname}-${pkgver}

  python setup.py build
}

check() {
  cd "${srcdir}"/${pkgname}-${pkgver}

  python -m pytest
}

package() {
  cd "${srcdir}"/${pkgname}-${pkgver}

  python setup.py install --root="${pkgdir}" --optimize=1
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}