summaryrefslogtreecommitdiff
path: root/user/py3-docutils/APKBUILD
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2018-01-09 08:13:39 +0000
committerMax Rees <maxcrees@me.com>2018-01-11 04:24:12 +0000
commitc7219dd67599fdf6c6e8db37011ca6653389bc7d (patch)
tree36b2cb6527ab2fb165cce69c0c83741606623da1 /user/py3-docutils/APKBUILD
parentcee386a7d341f6ad530f58bd7ec2785b935cda79 (diff)
downloadpackages-c7219dd67599fdf6c6e8db37011ca6653389bc7d.tar.gz
packages-c7219dd67599fdf6c6e8db37011ca6653389bc7d.tar.bz2
packages-c7219dd67599fdf6c6e8db37011ca6653389bc7d.tar.xz
packages-c7219dd67599fdf6c6e8db37011ca6653389bc7d.zip
user/py3-docutils: new package
Diffstat (limited to 'user/py3-docutils/APKBUILD')
-rw-r--r--user/py3-docutils/APKBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/user/py3-docutils/APKBUILD b/user/py3-docutils/APKBUILD
new file mode 100644
index 000000000..e227ada63
--- /dev/null
+++ b/user/py3-docutils/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=py3-docutils
+_pkgname=docutils
+pkgver=0.14
+pkgrel=0
+pkgdesc="Documentation utilities for Python"
+url="https://pypi.python.org/pypi/docutils"
+arch="noarch"
+license="Custom"
+depends="python3 py3-pillow py3-roman"
+makedepends="python3-dev py3-setuptools"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir/test3"
+ python3 alltests.py
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+
+ # Remove .py extension from executable files.
+ local path; for path in "$pkgdir"/usr/bin/*.py; do
+ mv "$path" "${path%.py}"
+ done
+}
+
+doc() {
+ cd "$builddir"
+
+ local docdir="$subpkgdir/usr/share/doc/$pkgname"
+ mkdir -p "$docdir"
+ cp -R docs/* "$docdir"
+ cp *.txt "$docdir"
+
+ local licdir="$subpkgdir/usr/share/licenses/$pkgname"
+ mkdir -p "$licdir"
+ rm -f licenses/docutils.conf
+ cp licenses/* "$licdir"
+}
+
+sha512sums="1ed72c2ef7d2ca38d1c6f3154b7986ea46f599d9bd826405a5257fdd7740c8626957d6298aa95fb0edea8a24515de22f1ad9b2ecbd59341a1ab7a2bab30f500c py3-docutils-0.14.tar.gz"