summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-01-08 23:13:40 +0800
committerUniversebenzene2019-01-08 23:13:40 +0800
commit954aebb320f5430276983a2984afab06245b21db (patch)
tree6b4af09edf9bd803a5f47a95b5de312811ffae32
parentaa2df5bd913688352279a25f624d5af788718b27 (diff)
downloadaur-954aebb320f5430276983a2984afab06245b21db.tar.gz
Add python2 version
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD51
2 files changed, 54 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 36a9693b165..54e4d444e99 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Wed Dec 19 11:22:51 UTC 2018
+# Tue Jan 8 15:12:15 UTC 2019
pkgbase = python-astropy-healpix
pkgdesc = BSD-licensed HEALPix for Astropy
pkgver = 0.4
@@ -8,13 +8,15 @@ pkgbase = python-astropy-healpix
arch = i686
arch = x86_64
license = BSD
- checkdepends = python-pytest
+ checkdepends = python-pytest-astropy
checkdepends = python-healpy
checkdepends = python-hypothesis
makedepends = cython
+ makedepends = cython2
makedepends = python-astropy>=1.2
+ makedepends = python2-astropy>=1.2
makedepends = python-astropy-helpers>=3.1
- makedepends = python-sphinx
+ makedepends = python2-astropy-helpers
makedepends = python-sphinx-astropy
source = https://files.pythonhosted.org/packages/source/a/astropy-healpix/astropy-healpix-0.4.tar.gz
md5sums = 59174f71ae6ef8b8969b2cfce702231e
@@ -25,6 +27,15 @@ pkgname = python-astropy-healpix
depends = python-astropy>=1.2
optdepends = python-astropy-healpix-doc: Documentation for Astropy-HEALPix
+pkgname = python2-astropy-healpix
+ depends = python2>=2.7
+ depends = python2-numpy>=1.10
+ depends = python2-astropy>=1.2
+ optdepends = python-astropy-healpix-doc: Documentation for Astropy-HEALPix
+ optdepends = python2-pytest<3.7: For testing
+ optdepends = python2-healpy: For testing
+ optdepends = python2-hypothesis: For testing
+
pkgname = python-astropy-healpix-doc
pkgdesc = Documentation for AstroPy-HEALPix
diff --git a/PKGBUILD b/PKGBUILD
index 3f26b5783ac..622cc68eda6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,37 @@
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-astropy-healpix
-pkgname=('python-astropy-healpix' 'python-astropy-healpix-doc')
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python2-${_pyname}" "python-${_pyname}-doc")
pkgver=0.4
pkgrel=1
pkgdesc="BSD-licensed HEALPix for Astropy"
arch=('i686' 'x86_64')
url="http://astropy-healpix.readthedocs.io/en/latest/"
license=('BSD')
-makedepends=('cython' 'python-astropy>=1.2' 'python-astropy-helpers>=3.1' 'python-sphinx' 'python-sphinx-astropy')
-checkdepends=('python-pytest' 'python-healpy' 'python-hypothesis')
-source=("https://files.pythonhosted.org/packages/source/a/astropy-healpix/astropy-healpix-${pkgver}.tar.gz")
+makedepends=('cython' 'cython2' 'python-astropy>=1.2' 'python2-astropy>=1.2' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers' 'python-sphinx-astropy')
+checkdepends=('python-pytest-astropy'
+# 'python2-pytest'
+# 'python2-healpy'
+ 'python-healpy'
+# 'python2-hypothesis'
+ 'python-hypothesis')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('59174f71ae6ef8b8969b2cfce702231e')
prepare() {
- cd ${srcdir}/astropy-healpix-${pkgver}
-
+ cd ${srcdir}/${_pyname}-${pkgver}
sed -i -e '/auto_use/s/True/False/' setup.cfg
+
+ cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
}
build() {
- cd ${srcdir}/astropy-healpix-${pkgver}
+ 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"
@@ -27,15 +39,32 @@ build() {
}
check() {
- cd ${srcdir}/astropy-healpix-${pkgver}
-
+# 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-astropy-healpix() {
+ depends=('python2>=2.7' 'python2-numpy>=1.10' 'python2-astropy>=1.2')
+ optdepends=('python-astropy-healpix-doc: Documentation for Astropy-HEALPix'
+ 'python2-pytest<3.7: For testing'
+ 'python2-healpy: For testing'
+ 'python2-hypothesis: For testing')
+ cd ${srcdir}/${_pyname}-${pkgver}-py2
+
+ install -D -m644 LICENSE.md -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 --use-system-libraries --offline
}
package_python-astropy-healpix() {
depends=('python>=3.5' 'python-numpy>=1.10' 'python-astropy>=1.2')
optdepends=('python-astropy-healpix-doc: Documentation for Astropy-HEALPix')
- cd ${srcdir}/astropy-healpix-${pkgver}
+ cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
@@ -44,7 +73,7 @@ package_python-astropy-healpix() {
package_python-astropy-healpix-doc() {
pkgdesc="Documentation for AstroPy-HEALPix"
- cd ${srcdir}/astropy-healpix-${pkgver}/docs/_build
+ cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"