blob: d5c9e77c2d336d0aa4f28650877e258926c126ee (
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
55
56
|
# Maintainer: Ben Wolsieffer <benwolsieffer@gmail.com>
_py_pkgname=sphinx-argparse
_github_url=https://github.com/ribozz/sphinx-argparse
pkgbase=python-${_py_pkgname}
pkgname=(python-${_py_pkgname} python2-${_py_pkgname})
pkgver=0.2.2
pkgrel=1
pkgdesc="Sphinx extension that automatically documents argparse commands and options."
arch=('any')
url="${_github_url}"
license=('MIT')
makedepends=('git' 'python-setuptools' 'python2-setuptools')
checkdepends=('python-pytest' 'python2-pytest')
source=(${_py_pkgname}::git+${_github_url}.git#tag=$pkgver)
sha256sums=('SKIP')
build() {
cd "${srcdir}/${_py_pkgname}"
python setup.py build
python2 setup.py build
}
check() {
cd "${srcdir}/${_py_pkgname}"
py.test
# Tests fail because of non-standard executable name py.test2
# py.test2
}
# Automatically create package functions using Bash magic
source /dev/stdin << EOF
package_python-${_py_pkgname}() {
depends=('python-sphinx')
optdepends=('python-commonmark: markdown support')
cd "\${srcdir}/${_py_pkgname}"
python setup.py install --skip-build --root="\${pkgdir}" --optimize=1
install -Dm644 LICENSE "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE"
}
package_python2-${_py_pkgname}() {
depends=('python2-sphinx')
optdepends=('python2-commonmark: markdown support')
cd "\${srcdir}/${_py_pkgname}"
python2 setup.py install --skip-build --root="\${pkgdir}" --optimize=1
install -Dm644 LICENSE "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE"
}
EOF
# vim:set ts=4 sw=4 et:
|