blob: 9eac764f1f6fb77327e94aa638f01e7891f5ce05 (
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
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinuxn.org>
pkgname=py-toml
_pyname=toml
pkgver=0.10.0
pkgrel=0
pkgdesc="Python library for TOML"
url="https://github.com/uiri/toml"
arch="all"
license="MIT"
makedepends="python2-dev py2-setuptools
python3-dev py3-setuptools"
checkdepends="py2-pytest py3-pytest"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pyname%${_pyname#?}}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/"$_pyname-$pkgver
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py test
python3 setup.py test
}
package() {
cd "$builddir"
python2 setup.py install --skip-build --prefix=/usr --root="$pkgdir"
python3 setup.py install --skip-build --prefix=/usr --root="$pkgdir"
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
mkdir -p "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/$python* "$subpkgdir"/usr/lib/
}
_py2() {
depends="$_py2deps"
_py python2
}
_py3() {
depends="$_py3deps"
_py python3
}
sha512sums="26f26c38ce9cd48305218c2c34c5a5407b00aefc25a933f044bb7be22c23cfdfa3b8cf2da952d17760c4b9038df62e405fa039cc7b63dd3e94c9c312f04f9182 toml-0.10.0.tar.gz"
|