aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-sphinx_rtd_theme/APKBUILD
blob: ecfe02de45df1004bfa48a2504b7ce192880d60d (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-sphinx_rtd_theme
_pkgname=sphinx_rtd_theme
pkgver=0.4.1
pkgrel=0
pkgdesc="Sphinx theme for readthedocs.org"
url="https://github.com/snide/sphinx_rtd_theme"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
checkdepends="pytest"
options="!check" # readthedocs_ext is missing
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/snide/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

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

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

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

_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"

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

sha512sums="f50134bbd55a09250537eaa4d3bda1ab8400ec3fb0afa7ebf436612bd5a1504b9079810567018f73fc9936247b0e281ab276e3df96650e1bccc3591db401dff1  sphinx_rtd_theme-0.4.1.tar.gz"