diff options
author | Universebenzene | 2019-01-09 22:19:32 +0800 |
---|---|---|
committer | Universebenzene | 2019-01-09 22:19:32 +0800 |
commit | 324d1e2cb9fde6770384f4410dc58442bc100416 (patch) | |
tree | d07a153dbca7866c4897521179004a1c0b8b1c0f | |
download | aur-324d1e2cb9fde6770384f4410dc58442bc100416.tar.gz |
Initial import 0.9
-rw-r--r-- | .SRCINFO | 49 | ||||
-rw-r--r-- | PKGBUILD | 104 |
2 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..870a0fd1263c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,49 @@ +# Generated by mksrcinfo v8 +# Wed Jan 9 14:11:37 UTC 2019 +pkgbase = python-gammapy + pkgdesc = A Python package for gamma-ray astronomy + pkgver = 0.9 + pkgrel = 1 + url = https://gammapy.org/ + arch = i686 + arch = x86_64 + license = BSD + makedepends = python-setuptools + makedepends = python2-setuptools + makedepends = python-astropy-helpers>=3.1 + makedepends = python2-astropy-helpers + source = https://files.pythonhosted.org/packages/source/g/gammapy/gammapy-0.9.tar.gz + md5sums = 118d4d5bdffa846c84a5f042dd989163 + +pkgname = python-gammapy + depends = python>=3.5 + depends = python-astropy>=1.0.2 + depends = python-regions + depends = python-click + optdepends = python-yaml: For YAML data handling (config and results files) + optdepends = python-reproject: For numerical methods + optdepends = python-iminuit: For fitting by optimization + optdepends = python-uncertainties: For linear error propagation + optdepends = python-matplotlib: For plotting + optdepends = python-emcee: For fitting by MCMC sampling + optdepends = python-healpy: For HEALPIX data handling + optdepends = python-naima: For SED modeling + optdepends = python-sherpa: For modelling and fitting + optdepends = python-pytest-astropy: For testing + +pkgname = python2-gammapy + depends = python2>=2.7 + depends = python2-astropy>=1.0.2 + depends = python2-regions + depends = python2-click + optdepends = python2-yaml: For YAML data handling (config and results files) + optdepends = python2-reproject: For numerical methods + optdepends = python2-iminuit: For fitting by optimization + optdepends = python2-uncertainties: For linear error propagation + optdepends = python2-matplotlib: For plotting + optdepends = python2-emcee: For fitting by MCMC sampling + optdepends = python2-healpy: For HEALPIX data handling + optdepends = python2-naima: For SED modeling + optdepends = python2-sherpa: For modelling and fitting + optdepends = python2-pytest<3.7: For testing + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..216c25e561d7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,104 @@ +# Maintainer: Astro Benzene <universebenzene at sina dot com> +pkgbase=python-gammapy +_pyname=${pkgbase#python-} +pkgname=("python-${_pyname}" "python2-${_pyname}") +#"python-${_pyname}-doc") +pkgver=0.9 +pkgrel=1 +pkgdesc="A Python package for gamma-ray astronomy" +arch=('i686' 'x86_64') +url="https://gammapy.org/" +license=('BSD') +makedepends=('python-setuptools' 'python2-setuptools' 'python-astropy-helpers>=3.1' 'python2-astropy-helpers') +#'python-sphinx-astropy' 'python-nbsphinx' 'python-sphinx-click' 'python-click' 'python-regions') +#checkdepends=('python-pytest-astropy' +# 'python2-pytest' +# 'python2-yaml' +# 'python-yaml' +# 'python2-click' +# 'python-click' +# 'python2-regions' +# 'python-regions' +# 'python2-astropy-healpix' +# 'python-astropy-healpix') +source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") +md5sums=('118d4d5bdffa846c84a5f042dd989163') + +prepare() { + cd ${srcdir}/${_pyname}-${pkgver} + sed -i -e '/auto_use/s/True/False/' setup.cfg + + 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-gammapy() { + depends=('python2>=2.7' 'python2-astropy>=1.0.2' 'python2-regions' 'python2-click') + optdepends=('python2-yaml: For YAML data handling (config and results files)' + 'python2-reproject: For numerical methods' + 'python2-iminuit: For fitting by optimization' + 'python2-uncertainties: For linear error propagation' + 'python2-matplotlib: For plotting' + 'python2-emcee: For fitting by MCMC sampling' + 'python2-healpy: For HEALPIX data handling' + 'python2-naima: For SED modeling' + 'python2-sherpa: For modelling and fitting' +# 'python-gammapy-doc: Documentation for Gammapy' + 'python2-pytest<3.7: For testing') + cd ${srcdir}/${_pyname}-${pkgver}-py2 + + install -D -m644 licenses/* -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 + mv ${pkgdir}/usr/bin/gammapy{,2} +} + +package_python-gammapy() { + depends=('python>=3.5' 'python-astropy>=1.0.2' 'python-regions' 'python-click') + optdepends=('python-yaml: For YAML data handling (config and results files)' + 'python-reproject: For numerical methods' + 'python-iminuit: For fitting by optimization' + 'python-uncertainties: For linear error propagation' + 'python-matplotlib: For plotting' + 'python-emcee: For fitting by MCMC sampling' + 'python-healpy: For HEALPIX data handling' + 'python-naima: For SED modeling' + 'python-sherpa: For modelling and fitting' +# 'python-gammapy-doc: Documentation for Gammapy' + 'python-pytest-astropy: For testing') + cd ${srcdir}/${_pyname}-${pkgver} + + install -D -m644 licenses/* -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-gammapy-doc() { +# pkgdesc="Documentation for Gammapy" +# cd ${srcdir}/${_pyname}-${pkgver}/docs/_build +# +# install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}" +# cp -a html "${pkgdir}/usr/share/doc/${pkgbase}" +#} |