summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-02-23 19:50:01 +0800
committerUniversebenzene2019-02-23 19:50:01 +0800
commit6a24e2c81758dda2ad48c98e6f9afce3aaec3be9 (patch)
tree205292bea52903226c50597cb77efede00136bc6
parent55f6f4ffd4a276ac7f598374e7562fbf08d903d7 (diff)
downloadaur-6a24e2c81758dda2ad48c98e6f9afce3aaec3be9.tar.gz
Fix DeprecationWarning
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD34
-rw-r--r--fix_deprecation_warning.patch27
3 files changed, 56 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 078f4a3c692..365f0667e89 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,30 @@
# Generated by mksrcinfo v8
-# Tue Jan 8 15:31:45 UTC 2019
+# Sat Feb 23 11:44:25 UTC 2019
pkgbase = python-astropy-healpix
pkgdesc = BSD-licensed HEALPix for Astropy
pkgver = 0.4
- pkgrel = 1
- url = http://astropy-healpix.readthedocs.io/en/latest/
+ pkgrel = 2
+ url = http://astropy-healpix.readthedocs.io/
arch = i686
arch = x86_64
license = BSD
checkdepends = python-pytest-astropy
+ checkdepends = python2-pytest32
+ checkdepends = python2-healpy
checkdepends = python-healpy
+ checkdepends = python2-hypothesis
checkdepends = python-hypothesis
- makedepends = cython
- makedepends = cython2
- makedepends = python-astropy>=1.2
- makedepends = python2-astropy>=1.2
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ makedepends = python2-numpy
+ makedepends = python-astropy
makedepends = python-astropy-helpers>=3.1
makedepends = python2-astropy-helpers
makedepends = python-sphinx-astropy
source = https://files.pythonhosted.org/packages/source/a/astropy-healpix/astropy-healpix-0.4.tar.gz
+ source = fix_deprecation_warning.patch
md5sums = 59174f71ae6ef8b8969b2cfce702231e
+ md5sums = 71e532a1fed7a57d4ccf0d3e41035dd8
pkgname = python-astropy-healpix
depends = python>=3.5
@@ -32,9 +37,6 @@ pkgname = python2-astropy-healpix
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 b92c38d0796..2e9e9c6d941 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,25 +3,28 @@ pkgbase=python-astropy-healpix
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python2-${_pyname}" "python-${_pyname}-doc")
pkgver=0.4
-pkgrel=1
+pkgrel=2
pkgdesc="BSD-licensed HEALPix for Astropy"
arch=('i686' 'x86_64')
-url="http://astropy-healpix.readthedocs.io/en/latest/"
+url="http://astropy-healpix.readthedocs.io/"
license=('BSD')
-makedepends=('cython' 'cython2' 'python-astropy>=1.2' 'python2-astropy>=1.2' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers' 'python-sphinx-astropy')
+makedepends=('python-setuptools' 'python2-setuptools' 'python2-numpy' 'python-astropy' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers' 'python-sphinx-astropy')
checkdepends=('python-pytest-astropy'
-# 'python2-pytest'
-# 'python2-healpy'
+ 'python2-pytest32'
+ 'python2-healpy'
'python-healpy'
-# 'python2-hypothesis'
+ 'python2-hypothesis'
'python-hypothesis')
-source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
-md5sums=('59174f71ae6ef8b8969b2cfce702231e')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'fix_deprecation_warning.patch')
+md5sums=('59174f71ae6ef8b8969b2cfce702231e'
+ '71e532a1fed7a57d4ccf0d3e41035dd8')
prepare() {
cd ${srcdir}/${_pyname}-${pkgver}
- sed -i -e '/auto_use/s/True/False/' setup.cfg
+ sed -i -e '/auto_use/s/True/False/' setup.cfg
+ patch -Np1 -i "${srcdir}/fix_deprecation_warning.patch"
cp -a ${srcdir}/${_pyname}-${pkgver}{,-py2}
}
@@ -39,21 +42,18 @@ build() {
}
check() {
-# msg "Checking Python3"
+ msg "Checking Python3"
cd ${srcdir}/${_pyname}-${pkgver}
python setup.py test
-# msg "Checking Python2"
-# cd ${srcdir}/${_pyname}-${pkgver}-py2
-# python2 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')
+ optdepends=('python-astropy-healpix-doc: Documentation for Astropy-HEALPix')
cd ${srcdir}/${_pyname}-${pkgver}-py2
install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/fix_deprecation_warning.patch b/fix_deprecation_warning.patch
new file mode 100644
index 00000000000..08831a9bacb
--- /dev/null
+++ b/fix_deprecation_warning.patch
@@ -0,0 +1,27 @@
+--- a/astropy_healpix/core.py 2018-12-19 03:23:52.000000000 +0800
++++ b/astropy_healpix/core.py 2019-02-23 19:07:17.514787248 +0800
+@@ -38,9 +38,9 @@
+ return args[0].reshape(shape)
+ else:
+ if len(args) > 1:
+- return [np.asscalar(arg) for arg in args]
++ return [arg.item() for arg in args]
+ else:
+- return np.asscalar(args[0])
++ return args[0].item()
+
+
+ def _validate_order(order):
+--- a/astropy_healpix/healpy.py 2018-12-19 03:23:52.000000000 +0800
++++ b/astropy_healpix/healpy.py 2019-02-23 19:11:40.427182742 +0800
+@@ -121,8 +121,8 @@
+ theta, phi = vec2ang(np.transpose([x, y, z]))
+ # hp.vec2ang() returns raveled arrays, which are 1D.
+ if np.isscalar(x):
+- theta = np.asscalar(theta)
+- phi = np.asscalar(phi)
++ theta = theta.item()
++ phi = phi.item()
+ else:
+ shape = np.shape(x)
+ theta = theta.reshape(shape)