summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2018-02-09 03:12:18 +0800
committerUniversebenzene2018-02-09 03:12:18 +0800
commite3d738e8bb70d93ffbe085de8c80ac9c1cab2a1b (patch)
tree8ca1b5928bf96f43524cc17636053b5d7a09d9d7
parentbc850ef996ad9498f6d8625a18fd63140f3a3fda (diff)
downloadaur-e3d738e8bb70d93ffbe085de8c80ac9c1cab2a1b.tar.gz
Add documentation build
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD51
2 files changed, 51 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b883f8f69d5..a96d6f0cce5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,28 @@
# Generated by mksrcinfo v8
-# Mon Feb 5 14:27:36 UTC 2018
+# Thu Feb 8 19:11:31 UTC 2018
pkgbase = python-regions
pkgdesc = Astropy affilated package for region handling
pkgver = 0.2
- pkgrel = 1
+ pkgrel = 2
url = http://astropy-regions.readthedocs.io/en/latest/
arch = i686
arch = x86_64
license = BSD
makedepends = cython
+ makedepends = python-astropy-helpers
+ makedepends = python-sphinx
+ source = https://files.pythonhosted.org/packages/source/r/regions/regions-0.2.tar.gz
+ md5sums = 48597dc17906e478292040dae2df5596
+
+pkgname = python-regions
depends = python>=3.4
depends = python-numpy>=1.9
depends = python-astropy>=1.2
optdepends = python-matplotlib>=1.5: Plotting support
optdepends = python-shapely: Managing geometric objects
optdepends = python-pytest-arraydiff: For testing
- source = https://files.pythonhosted.org/packages/source/r/regions/regions-0.2.tar.gz
- md5sums = 48597dc17906e478292040dae2df5596
+ optdepends = python-regions-doc: Documentation for AstroPy Regions
-pkgname = python-regions
+pkgname = python-regions-doc
+ pkgdesc = Documentation for AstroPy Regions
diff --git a/PKGBUILD b/PKGBUILD
index f497e8da3bf..bdb24d0f656 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,51 @@
# Maintainer: Astro Benzene <universebenzene at sina dot com>
-pkgname=python-regions
+pkgbase=python-regions
+pkgname=('python-regions' 'python-regions-doc')
pkgver=0.2
-pkgrel=1
+pkgrel=2
pkgdesc="Astropy affilated package for region handling"
arch=('i686' 'x86_64')
url="http://astropy-regions.readthedocs.io/en/latest/"
license=('BSD')
-depends=('python>=3.4' 'python-numpy>=1.9' 'python-astropy>=1.2')
-makedepends=('cython')
-optdepends=('python-matplotlib>=1.5: Plotting support'
- 'python-shapely: Managing geometric objects'
- 'python-pytest-arraydiff: For testing')
+makedepends=('cython' 'python-astropy-helpers' 'python-sphinx')
+#checkdepends=('python-pytest-arraydiff')
source=("https://files.pythonhosted.org/packages/source/r/regions/regions-${pkgver}.tar.gz")
md5sums=('48597dc17906e478292040dae2df5596')
-package() {
- cd ${srcdir}/regions-${pkgver}
+prepare() {
+ cd ${srcdir}/regions-${pkgver}
+ sed -i -e '/auto_use/s/True/False/' setup.cfg
+}
+
+build () {
+ cd ${srcdir}/regions-${pkgver}
+ python setup.py build --use-system-libraries --offline
+
+ msg "Building Docs"
+ python setup.py build_docs
+}
+
+#check(){
+# cd $srcdir/astroplan-${pkgver}
+#
+# python setup.py test
+#}
+
+package_python-regions() {
+ depends=('python>=3.4' 'python-numpy>=1.9' 'python-astropy>=1.2')
+ optdepends=('python-matplotlib>=1.5: Plotting support'
+ 'python-shapely: Managing geometric objects'
+ 'python-pytest-arraydiff: For testing'
+ 'python-regions-doc: Documentation for AstroPy Regions')
+ cd ${srcdir}/regions-${pkgver}
+
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+}
+
+package_python-regions-doc() {
+ pkgdesc="Documentation for AstroPy Regions"
+ cd ${srcdir}/regions-${pkgver}/docs/_build
- install -D -m644 docs/{*.rst,*.py,*.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
- python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}