summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-01-23 16:22:48 +0800
committerUniversebenzene2019-01-23 16:22:48 +0800
commit2e331ae00bc1bd822d58f2fcf1f1e8416a410802 (patch)
tree044e57c50af42962d40acfdfab55ca60c39335e9
downloadaur-2e331ae00bc1bd822d58f2fcf1f1e8416a410802.tar.gz
Initial import 0.1.21
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD88
-rw-r--r--correct_doc_examples.patch13
3 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..54430b6ff67
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+# Generated by mksrcinfo v8
+# Wed Jan 23 08:21:59 UTC 2019
+pkgbase = python-pyspeckit
+ pkgdesc = Toolkit for fitting and manipulating spectroscopic data in python
+ pkgver = 0.1.21
+ pkgrel = 1
+ url = https://pyspeckit.readthedocs.io/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ makedepends = python-astropy
+ makedepends = python-astropy-helpers>=3.1
+ makedepends = python2-astropy-helpers
+ makedepends = python-sphinx-astropy
+ source = https://files.pythonhosted.org/packages/source/p/pyspeckit/pyspeckit-0.1.21.tar.gz
+ source = correct_doc_examples.patch
+ md5sums = e276915c2865e0e64dc132a3b9cb0b23
+ md5sums = b1ea9f4f4d2c467c26c34293bfbd387f
+
+pkgname = python-pyspeckit
+ depends = python-numpy>=1.4
+ depends = python-astropy>=1.0
+ depends = python-matplotlib>=1.4
+ optdepends = hdf5
+ optdepends = python-atpy
+ optdepends = python-spectral-cube
+ optdepends = python-lmfit
+ optdepends = python-pyspeckit-doc: Documentation for PySpeckit
+ optdepends = python-pytest: For testing
+
+pkgname = python2-pyspeckit
+ depends = python2-numpy>=1.4
+ depends = python2-astropy>=1.0
+ depends = python2-matplotlib>=1.4
+ optdepends = hdf5
+ optdepends = python2-atpy
+ optdepends = python2-spectral-cube
+ optdepends = python2-lmfit
+ optdepends = python-pyspeckit-doc: Documentation for PySpeckit
+ optdepends = python2-pytest: For testing
+
+pkgname = python-pyspeckit-doc
+ pkgdesc = Documentation for Python PySpeckit module
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..56fa9ab94d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python-pyspeckit
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python2-${_pyname}" "python-${_pyname}-doc")
+pkgver=0.1.21
+pkgrel=1
+pkgdesc="Toolkit for fitting and manipulating spectroscopic data in python"
+arch=('i686' 'x86_64')
+url="https://pyspeckit.readthedocs.io/"
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-astropy' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers' 'python-sphinx-astropy')
+#checkdepends=('python-pytest-astropy' 'python2-pytest' 'python2-astropy' 'python2-spectral-cube' 'python-spectral-cube')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'correct_doc_examples.patch')
+md5sums=('e276915c2865e0e64dc132a3b9cb0b23'
+ 'b1ea9f4f4d2c467c26c34293bfbd387f')
+
+prepare() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ sed -i -e '/auto_use/s/True/False/' setup.cfg
+ patch -Np1 -i "${srcdir}/correct_doc_examples.patch"
+ cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
+}
+
+build() {
+ msg "Building Python2"
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+ python2 setup.py build --use-system-libraries --offline
+
+ msg "Building Python3"
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build --use-system-libraries --offline
+
+ msg "Building Docs"
+ python setup.py build_docs
+}
+
+#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-pyspeckit() {
+ depends=('python2-numpy>=1.4' 'python2-astropy>=1.0' 'python2-matplotlib>=1.4')
+ optdepends=('hdf5'
+ 'python2-atpy'
+ 'python2-spectral-cube'
+ 'python2-lmfit'
+ 'python-pyspeckit-doc: Documentation for PySpeckit'
+ 'python2-pytest: For testing')
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" licenses/*
+ install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README*
+ python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+ sed -i -e '/\#\/bin/s/ipython/ipython2/' ${pkgdir}/usr/bin/pyspeckit_script.py
+ mv ${pkgdir}/usr/bin/astropy-package-template-example{,2}
+ mv ${pkgdir}/usr/bin/pyspeckit_script{,2}.py
+}
+
+package_python-pyspeckit() {
+ depends=('python-numpy>=1.4' 'python-astropy>=1.0' 'python-matplotlib>=1.4')
+ optdepends=('hdf5'
+ 'python-atpy'
+ 'python-spectral-cube'
+ 'python-lmfit'
+ 'python-pyspeckit-doc: Documentation for PySpeckit'
+ 'python-pytest: For testing')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" licenses/*
+ install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README*
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+}
+
+package_python-pyspeckit-doc() {
+ pkgdesc="Documentation for Python PySpeckit module"
+ cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}
diff --git a/correct_doc_examples.patch b/correct_doc_examples.patch
new file mode 100644
index 00000000000..02eadc4a656
--- /dev/null
+++ b/correct_doc_examples.patch
@@ -0,0 +1,13 @@
+--- a/docs/examples.rst 2018-09-13 07:31:40.000000000 +0800
++++ b/docs/examples.rst 2019-01-22 20:54:07.258029841 +0800
+@@ -40,8 +40,8 @@
+ Radio NH3 - fit N hyperfines with no temperature <nh3_tau>
+ Radio N2H+ <example_n2hp>
+ Radio N2H+ cube <example_n2hp_cube>
+- Radio ortho-NH2D <example_o-n2hp>
+- Radio para-NH2D <example_p-n2hp>
++ Radio ortho-NH2D <example_o-nh2d>
++ Radio para-NH2D <example_p-nh2d>
+ Radio HCN: shows hyperfine with varying amplitude & width <example_hcn>
+ Radio HCO+ <example_hcop>
+ Near IR cube <example_NIR_cube>