diff options
author | Universebenzene | 2019-11-26 13:18:20 +0800 |
---|---|---|
committer | Universebenzene | 2019-11-26 13:18:20 +0800 |
commit | 40f1a109c741e8edc3d3055fe4db9f6fe285132c (patch) | |
tree | 85cbd46282301a914421e5cd923566879a10b0f6 | |
download | aur-40f1a109c741e8edc3d3055fe4db9f6fe285132c.tar.gz |
Initial import 0.4
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | fix_deprecation_warning.patch | 27 | ||||
-rw-r--r-- | python2-astropy-healpix.install | 5 |
5 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d3c7dbf0dfac --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = python2-astropy-healpix + pkgdesc = BSD-licensed HEALPix for Astropy + pkgver = 0.4 + pkgrel = 2 + url = http://astropy-healpix.readthedocs.io/ + arch = i686 + arch = x86_64 + license = BSD + makedepends = python2-setuptools + makedepends = python2-astropy + makedepends = python2-astropy-helpers + makedepends = python2-sphinx + makedepends = python2-matplotlib + source = https://files.pythonhosted.org/packages/source/a/astropy-healpix/astropy-healpix-0.4.tar.gz + source = python2-astropy-healpix.install + source = fix_deprecation_warning.patch + md5sums = 59174f71ae6ef8b8969b2cfce702231e + md5sums = 68d099a7f241f405c488da6f09618890 + md5sums = 71e532a1fed7a57d4ccf0d3e41035dd8 + +pkgname = python2-astropy-healpix + install = python2-astropy-healpix.install + depends = python2>=2.7 + depends = python2-numpy>=1.10 + depends = python2-astropy>=1.2 + optdepends = python2-astropy-healpix-doc: Documentation for Astropy-HEALPix + +pkgname = python2-astropy-healpix-doc + pkgdesc = Documentation for AstroPy-HEALPix + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0d6e3b36c63a --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +src +pkg +*.src.tar.gz +*.tar.gz +*.tar.bz2 +*.part +*.pkg.tar.xz +*.log diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4482c4e7927a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Astro Benzene <universebenzene at sina dot com> +pkgbase=python2-astropy-healpix +_pyname=${pkgbase#python2-} +pkgname=("python2-${_pyname}" "python2-${_pyname}-doc") +pkgver=0.4 +pkgrel=2 +pkgdesc="BSD-licensed HEALPix for Astropy" +arch=('i686' 'x86_64') +url="http://astropy-healpix.readthedocs.io/" +license=('BSD') +makedepends=('python2-setuptools' 'python2-astropy' 'python2-astropy-helpers' 'python2-sphinx' 'python2-matplotlib') +#checkdepends=('python2-pytest32' +# 'python2-healpy' +# 'python2-hypothesis') +source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz" + "python2-${_pyname}.install" + 'fix_deprecation_warning.patch') +md5sums=('59174f71ae6ef8b8969b2cfce702231e' + '68d099a7f241f405c488da6f09618890' + '71e532a1fed7a57d4ccf0d3e41035dd8') + +prepare() { + cd ${srcdir}/${_pyname}-${pkgver} + + sed -i -e '/auto_use/s/True/False/' setup.cfg + patch -Np1 -i "${srcdir}/fix_deprecation_warning.patch" +} + +build() { + cd ${srcdir}/${_pyname}-${pkgver} + python2 setup.py build --use-system-libraries --offline + + msg "Building Docs" + python2 setup.py build_docs +} + +#check() { +# if [ -z $(pacman -Qsq python2-pytest-cov) ]; then +# cd ${srcdir}/${_pyname}-${pkgver} +# python2 setup.py test +# fi +#} + +package_python2-astropy-healpix() { + depends=('python2>=2.7' 'python2-numpy>=1.10' 'python2-astropy>=1.2') + optdepends=('python2-astropy-healpix-doc: Documentation for Astropy-HEALPix') + install=python2-${_pyname}.install + 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}" + python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline +} + +package_python2-astropy-healpix-doc() { + pkgdesc="Documentation for AstroPy-HEALPix" + cd ${srcdir}/${_pyname}-${pkgver}/docs/_build + + install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../LICENSE.md + install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}" + cp -a html "${pkgdir}/usr/share/doc/${pkgbase}" +} diff --git a/fix_deprecation_warning.patch b/fix_deprecation_warning.patch new file mode 100644 index 000000000000..08831a9bacb2 --- /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) diff --git a/python2-astropy-healpix.install b/python2-astropy-healpix.install new file mode 100644 index 000000000000..f4ad517d6897 --- /dev/null +++ b/python2-astropy-healpix.install @@ -0,0 +1,5 @@ +post_install() { + echo " + ==> If you want to run the testing for python2 version of astropy-healpix, you need to remove the python2-pytest-cov package first. + " +} |