blob: 0ac29ed5113c221d7b583bd69afb1dc1075b96db (
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
|
# Maintainer:
pkgname=py-jwt
_pkgname=PyJWT
pkgver=1.7.1
pkgrel=1
pkgdesc="Python JSON Web Token implementation"
url="https://github.com/jpadilla/pyjwt"
arch="noarch"
license="MIT"
depends=""
checkdepends="pytest"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="$pkgname-cli py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
no-cov-report.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
cd "$builddir"
python2 -m pytest .
python3 -m pytest .
}
package() {
cd "$builddir"
python2 setup.py install --prefix=/usr --root="$pkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
cli() {
pkgdesc="$pkgdesc (CLI utility)"
depends="py3-jwt=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
local libpath="$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')"
mkdir -p "$subpkgdir"${libpath%/*}
mv "$pkgdir"$libpath "$subpkgdir"${libpath%/*}
}
sha512sums="70cd38127b6848933992c8b88303725ef71bfb430ad42eb63247e549b0bdab2a194137349d43ab02a1c97212dbc89f447ee3f0c5403dd14632b8b4b6b9235fc4 PyJWT-1.7.1.tar.gz
886877c4e40005d254abf6f00389e7e69e1a781119c29da7632e3f475b526e15b2387ab1bc5bade07234932c3a7396c06298540bdd1596a79a4a5e62b64517fc no-cov-report.patch"
|