summaryrefslogtreecommitdiff
path: root/main/py3-docutils/APKBUILD
blob: c0a18691d1844ee51682bad0ca2ae41d9d69d914 (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
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-docutils
pkgver=0.19
pkgrel=1
pkgdesc="Documentation Utilities for Python3"
url="https://pypi.python.org/pypi/docutils"
arch="noarch"
license="BSD-2-Clause AND GPL-3.0-or-later AND Python-2.0"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/d/docutils/docutils-$pkgver.tar.gz"
builddir="$srcdir/docutils-$pkgver"

replaces="py-docutils" # Backwards compatibility
provides="py-docutils=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 test/alltests.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"

	# Remove .py extension and add version suffix to executable files.
	local path; for path in "$pkgdir"/usr/bin/*.py; do
		mv "$path" "${path/.py/}"
		ln -sfv "$(basename "${path/.py/}")" "$path"
		ln -sfv "$(basename "${path/.py/}")" "${path/.py/}-3"
	done
}

sha512sums="
fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5  docutils-0.19.tar.gz
"