dev-python/regions: initial import
authorSébastien Fabbro <bicatali@gentoo.org>
Wed, 30 Nov 2016 23:23:39 +0000 (23:23 +0000)
committerSébastien Fabbro <bicatali@gentoo.org>
Wed, 30 Nov 2016 23:25:11 +0000 (23:25 +0000)
Package-Manager: portage-2.3.2

dev-python/regions/Manifest [new file with mode: 0644]
dev-python/regions/metadata.xml [new file with mode: 0644]
dev-python/regions/regions-0.1.ebuild [new file with mode: 0644]

diff --git a/dev-python/regions/Manifest b/dev-python/regions/Manifest
new file mode 100644 (file)
index 0000000..17762f6
--- /dev/null
@@ -0,0 +1 @@
+DIST regions-0.1.tar.gz 230345 SHA256 1a2d25abecb95b953b168d335d3b3dab30b9018937333a6d4d70c97650ccad2e SHA512 9d313c4fa871537881ba3c7185656460012adc8d7725b3070aeb81459eb6f1fc02f7279a7ff78ef3faeb61e95bce7dd409d5a5800848483f9eae1c5262e47593 WHIRLPOOL 678671681fdef5d9adc947981b304eb071d4313b2768259727288ba1f667306ba7bf22dce64fec6365eb5698035211192c041ab6c9c45b7691d8ad3b4011ff3c
diff --git a/dev-python/regions/metadata.xml b/dev-python/regions/metadata.xml
new file mode 100644 (file)
index 0000000..63ff260
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+  <email>sci-astronomy@gentoo.org</email>
+  <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+  The goal is to merge the functionality from pyregion and photutils apertures and then after some time propose this package for inclusion in the Astropy core.
+</longdescription>
+<upstream>
+  <remote-id type="pypi">regions</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/dev-python/regions/regions-0.1.ebuild b/dev-python/regions/regions-0.1.ebuild
new file mode 100644 (file)
index 0000000..cad48b6
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+inherit distutils-r1 virtualx xdg-utils
+
+DESCRIPTION="Astropy affiliated package for region handling"
+HOMEPAGE="http://astropy-regions.readthedocs.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="BSD"
+
+IUSE="doc test"
+RDEPEND="dev-python/astropy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       dev-python/astropy-helpers[${PYTHON_USEDEP}]
+       doc? (
+               dev-python/sphinx[${PYTHON_USEDEP}]
+               dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+               dev-python/wcsaxes[${PYTHON_USEDEP}] )
+       test? (
+               dev-python/pytest-mpl[${PYTHON_USEDEP}]
+               dev-python/wcsaxes[${PYTHON_USEDEP}]
+               sci-libs/scipy[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+       # use astropy-helpers from system
+       sed -i -e '/auto_use/s/True/False/' setup.cfg || die
+       xdg_environment_reset
+       distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+       if use doc; then
+               python_setup
+               VARTEXFONTS="${T}"/fonts \
+                       MPLCONFIGDIR="${BUILD_DIR}" \
+                       PYTHONPATH="${BUILD_DIR}"/lib \
+                       esetup.py build_sphinx --no-intersphinx
+       fi
+}
+
+python_test() {
+       echo 'backend: Agg' > ${WORKDIR}/matplotlibrc || die
+       export MATPLOTLIBRC=${WORKDIR}
+       virtx esetup.py test
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( docs/_build/html/. )
+       distutils-r1_python_install_all
+}