summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD54
-rw-r--r--correct_doc_label.patch8
3 files changed, 90 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4126e1229fb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+# Generated by mksrcinfo v8
+# Tue Jan 22 17:06:21 UTC 2019
+pkgbase = python2-atpy
+ pkgdesc = A new XNAT client that exposes XNAT objects/functions as python objects/functions.
+ pkgver = 0.9.7
+ pkgrel = 1
+ url = https://atpy.readthedocs.io/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = python2-setuptools
+ makedepends = python2-astropy
+ makedepends = python2-sphinx
+ source = https://files.pythonhosted.org/packages/source/A/ATpy/ATpy-0.9.7.tar.gz
+ source = correct_doc_label.patch
+ md5sums = 2306195fcefff7c1e4d36ae92a894ff2
+ md5sums = fdf28ae7bde877e055b4b18d75574c9c
+
+pkgname = python2-atpy
+ depends = python2>=2.6
+ depends = python2-numpy>=1.5
+ depends = python2-astropy>=0.2
+ optdepends = python-atpy-doc: Documentation for Python-ATpy
+ optdepends = python2-pytest: For testing
+
+pkgname = python-atpy-doc
+ pkgdesc = Documentation for Python ATpy module
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7860c9cee57
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python2-atpy
+_pyname=ATpy
+pkgname=('python2-atpy' 'python-atpy-doc')
+pkgver=0.9.7
+pkgrel=1
+pkgdesc="A new XNAT client that exposes XNAT objects/functions as python objects/functions."
+arch=('i686' 'x86_64')
+url="https://atpy.readthedocs.io/"
+license=('MIT')
+makedepends=('python2-setuptools' 'python2-astropy' 'python2-sphinx')
+#checkdepends=('python2-pytest')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'correct_doc_label.patch')
+md5sums=('2306195fcefff7c1e4d36ae92a894ff2'
+ 'fdf28ae7bde877e055b4b18d75574c9c')
+
+prepare() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ patch -Np1 -i "${srcdir}/correct_doc_label.patch"
+}
+
+build() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python2 setup.py build
+
+ msg "Building Docs"
+ python2 setup.py build_sphinx
+}
+
+#check() {
+# cd ${srcdir}/${_pyname}-${pkgver}
+# python2 setup.py test
+#}
+
+package_python2-atpy() {
+ depends=('python2>=2.6' 'python2-numpy>=1.5' 'python2-astropy>=0.2')
+ optdepends=('python-atpy-doc: Documentation for Python-ATpy'
+ 'python2-pytest: For testing')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}
+
+package_python-atpy-doc() {
+ pkgdesc="Documentation for Python ATpy module"
+ cd ${srcdir}/${_pyname}-${pkgver}/build/sphinx
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgname%-doc}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgname%-doc}"
+}
diff --git a/correct_doc_label.patch b/correct_doc_label.patch
new file mode 100644
index 00000000000..16cbd896e6a
--- /dev/null
+++ b/correct_doc_label.patch
@@ -0,0 +1,8 @@
+--- a/docs/format_online.rst 2013-07-05 17:46:04.000000000 +0800
++++ b/docs/format_online.rst 2019-01-23 00:34:05.497605940 +0800
+@@ -1,4 +1,4 @@
+-.. _format_hdf5:
++.. _format_online:
+
+ ==============
+ Online queries