summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-01-09 00:20:39 +0800
committerUniversebenzene2019-01-09 00:20:39 +0800
commitbcc4924629cec7336e80e756a91cb6f450df6770 (patch)
tree4f9995fccf8bf770bc12ebbcc0ade8930eb5b950
parent70a16a4005a8daeabf0b4846364bde8be4571627 (diff)
downloadaur-bcc4924629cec7336e80e756a91cb6f450df6770.tar.gz
Add python2 version and document
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD76
2 files changed, 72 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cbfe1f83cc4..447422fd6cb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Wed Dec 5 18:49:28 UTC 2018
+# Tue Jan 8 16:17:58 UTC 2019
pkgbase = python-regions
pkgdesc = Astropy affilated package for region handling
pkgver = 0.3
@@ -8,17 +8,36 @@ pkgbase = python-regions
arch = i686
arch = x86_64
license = BSD
+ checkdepends = python-pytest-astropy
+ checkdepends = python-astropy-healpix
makedepends = cython
- makedepends = python-astropy>=1.2
- makedepends = python-astropy-helpers
+ makedepends = cython2
+ makedepends = python-astropy>=1.3
+ makedepends = python2-astropy>=1.3
+ makedepends = python-astropy-helpers>=3.1
+ makedepends = python2-astropy-helpers
+ makedepends = python-sphinx-astropy
+ makedepends = python-shapely
source = https://files.pythonhosted.org/packages/source/r/regions/regions-0.3.tar.gz
md5sums = b2f0b08cdaa2b40519de665f9af2a25a
pkgname = python-regions
depends = python>=3.4
depends = python-numpy>=1.9
- depends = python-astropy>=1.2
+ depends = python-astropy>=1.3
optdepends = python-matplotlib>=1.5: Plotting support
optdepends = python-shapely: Managing geometric objects
- optdepends = python-pytest-astropy: For testing
+ optdepends = python-regions-doc: Documentation for AstroPy Regions
+
+pkgname = python2-regions
+ depends = python2>=2.7
+ depends = python2-numpy>=1.9
+ depends = python2-astropy>=1.3
+ optdepends = python2-matplotlib>=1.5: Plotting support
+ optdepends = python2-shapely: Managing geometric objects
+ optdepends = python-regions-doc: Documentation for AstroPy Regions
+ optdepends = python2-pytest<3.7: For testing
+
+pkgname = python-regions-doc
+ pkgdesc = Documentation for AstroPy Regions
diff --git a/PKGBUILD b/PKGBUILD
index f50dc1b9530..f20bb8066f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,74 @@
# Maintainer: Astro Benzene <universebenzene at sina dot com>
-#pkgbase=python-regions
-pkgname=('python-regions')
-#'python-regions-doc')
+pkgbase=python-regions
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python2-${_pyname}" "python-${_pyname}-doc")
pkgver=0.3
pkgrel=1
pkgdesc="Astropy affilated package for region handling"
arch=('i686' 'x86_64')
url="http://astropy-regions.readthedocs.io/en/latest/"
license=('BSD')
-makedepends=('cython' 'python-astropy>=1.2' 'python-astropy-helpers')
-#'python-sphinx' 'python-matplotlib' 'python-shapely')
-#checkdepends=('python-pytest-astropy' 'python-astropy-healpix')
-source=("https://files.pythonhosted.org/packages/source/r/regions/regions-${pkgver}.tar.gz")
+makedepends=('cython' 'cython2' 'python-astropy>=1.3' 'python2-astropy>=1.3' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers' 'python-sphinx-astropy' 'python-shapely')
+checkdepends=('python-pytest-astropy' 'python-astropy-healpix')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('b2f0b08cdaa2b40519de665f9af2a25a')
prepare() {
- cd ${srcdir}/regions-${pkgver}
-
+ cd ${srcdir}/${_pyname}-${pkgver}
sed -i -e '/auto_use/s/True/False/' setup.cfg
+
+ cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
}
build() {
- cd ${srcdir}/regions-${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"
-# python setup.py build_docs
+ 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
}
-#check() {
-# cd ${srcdir}/regions-${pkgver}
-#
-# python setup.py test
-#}
+package_python2-regions() {
+ depends=('python2>=2.7' 'python2-numpy>=1.9' 'python2-astropy>=1.3')
+ optdepends=('python2-matplotlib>=1.5: Plotting support'
+ 'python2-shapely: Managing geometric objects'
+ 'python-regions-doc: Documentation for AstroPy Regions'
+ 'python2-pytest<3.7: For testing')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+}
package_python-regions() {
- depends=('python>=3.4' 'python-numpy>=1.9' 'python-astropy>=1.2')
+ depends=('python>=3.4' 'python-numpy>=1.9' 'python-astropy>=1.3')
optdepends=('python-matplotlib>=1.5: Plotting support'
'python-shapely: Managing geometric objects'
-# 'python-regions-doc: Documentation for AstroPy Regions'
- 'python-pytest-astropy: For testing')
- cd ${srcdir}/regions-${pkgver}
+ 'python-regions-doc: Documentation for AstroPy Regions')
+# 'python-pytest-astropy: For testing')
+ cd ${srcdir}/${_pyname}-${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}/build/sphinx
-#
-# install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
-# cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
-#}
+package_python-regions-doc() {
+ pkgdesc="Documentation for AstroPy Regions"
+ cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}