summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorUniversebenzene2019-08-15 22:16:26 +0800
committerUniversebenzene2019-08-15 22:16:26 +0800
commit2c132e382da92ba741459e92e1989c8dc0462dc5 (patch)
treebe76c5960919550e7ab6e58ed003e9b8237d6595 /PKGBUILD
parentaec4ad981012a8dc8456f686d1fd2ee7522611f4 (diff)
downloadaur-2c132e382da92ba741459e92e1989c8dc0462dc5.tar.gz
Update to version 0.12
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD67
1 files changed, 57 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b7d189bcfae..bcbba2c13ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,70 @@
-# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
-# Contributor: Chris Severance aur.severach AatT spamgourmet.com
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
-pkgname=python-sphinx-automodapi
-_pyname=${pkgname#python-}
-pkgver=0.11
+pkgbase=python-sphinx-automodapi
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python2-${_pyname}" "python-${_pyname}-doc")
+pkgver=0.12
pkgrel=1
pkgdesc="Sphinx extension for generating API documentation."
arch=('any')
-url="https://sphinx-automodapi.readthedocs.io/en/latest/"
+url="https://sphinx-automodapi.readthedocs.io/"
license=('BSD')
-depends=('python-sphinx>=1.6')
-makedepends=('python-setuptools')
+makedepends=('python-setuptools' 'python-sphinx' 'python-sphinx_rtd_theme')
+checkdepends=('python-pytest' 'python2-pytest' 'python2-sphinx')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
-sha256sums=('4f61015db8c9a65809a41b1f609d827c99dc2c7b0179aedc4f64fc7d7aeec9e7')
+sha256sums=('a1338bc0a7f5c9bb317ecf7c7abd489c7cff452098205ef5110f733570516ac0')
-package() {
+prepare() {
+ cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
+}
+
+build() {
+ msg "Building Python2"
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+ python2 setup.py build
+
+ msg "Building Python3"
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build
+
+ msg "Building Docs"
+ python setup.py build_sphinx
+}
+
+check() {
+ msg "Checking Python3"
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py test
+
+ msg "Checking Python2"
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+ python2 setup.py test
+}
+
+package_python2-sphinx-automodapi() {
+ depends=('python2-sphinx>=1.7')
+ optdepends=('python-sphinx-automodapi-doc: Documentation for sphinx-automodapi')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}
+
+package_python-sphinx-automodapi() {
+ depends=('python-sphinx>=1.7')
+ optdepends=('python-sphinx-automodapi-doc: Documentation for sphinx-automodapi')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
}
+
+package_python-sphinx-automodapi-doc() {
+ pkgdesc="Documentation for sphinx-automodapi"
+ cd ${srcdir}/${_pyname}-${pkgver}/build/sphinx
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}