aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-pygfm/APKBUILD
blob: d2c7dac68e5961fc074ef7208be4cfda16f89c4b (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: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=py-pygfm
_pkgname=py-gfm
pkgver=0.1.4
pkgrel=0
pkgdesc="Github-Flavored Markdown for Python-Markdown"
url="https://github.com/zopieux/py-gfm"
arch="noarch"
license="BSD-3-Clause"
makedepends="python2-dev python3-dev py-setuptools"
checkdepends="py-codecov py-coverage py-coveralls py-markdown"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/Zopieux/py-gfm/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py --quiet build
	python3 setup.py --quiet build
}

check() {
	cd "$builddir"
	python2 test.py
	python3 test.py
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	depends="${depends//py-/py2-}"
	_py python2
}

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="4730035b8a6168b6d2987a4a5f9a0ca70564e6797b7c88ec43f04152fa77c5a396f204b6143fc0bb3a53ab364b6d11b2274663b8b64d4640afba2a21cd1e3c6a  py-pygfm-0.1.4.tar.gz"