diff options
author | Joseph Jon Booker <joe@neoturbine.net> | 2014-08-08 16:09:23 -0400 |
---|---|---|
committer | Joseph Jon Booker <joe@neoturbine.net> | 2014-08-08 16:09:23 -0400 |
commit | ee14f2ab1333b59ae63b627c33fa8d93af362b92 (patch) | |
tree | 7153206cbfc11283d0c8fab998ea6e55c07e0e2a /dev-python/specutils/specutils-9999.ebuild | |
parent | dev-python/photutils: Add photutils package (diff) | |
download | sci-ee14f2ab1333b59ae63b627c33fa8d93af362b92.tar.gz sci-ee14f2ab1333b59ae63b627c33fa8d93af362b92.tar.bz2 sci-ee14f2ab1333b59ae63b627c33fa8d93af362b92.zip |
dev-python/specutils: Add specutils package
Package-Manager: portage-2.2.11-r1
Diffstat (limited to 'dev-python/specutils/specutils-9999.ebuild')
-rw-r--r-- | dev-python/specutils/specutils-9999.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/dev-python/specutils/specutils-9999.ebuild b/dev-python/specutils/specutils-9999.ebuild new file mode 100644 index 000000000..f8cfd5c2f --- /dev/null +++ b/dev-python/specutils/specutils-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} ) +inherit distutils-r1 + +if [ ${PV} == "9999" ] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/astropy/${PN}.git" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Affiliated package for 1D spectral operations" +HOMEPAGE="https://github.com/astropy/specutils" + +LICENSE="BSD" +SLOT="0" +IUSE="doc" +DOCS=( README.rst ) + +RDEPEND=" + >=dev-python/astropy-0.4[${PYTHON_USEDEP}] + dev-python/astropy-helpers[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}]" + +DEPEND="${RDEPEND}" + +python_prepare_all() { + distutils-r1_python_prepare_all + sed -e '/import ah_bootstrap/d' -i setup.py || die "Removing ah_bootstrap failed" +} + +python_compile_all() { + if use doc; then + python_export_best + VARTEXFONTS="${T}"/fonts \ + MPLCONFIGDIR="${BUILD_DIR}" \ + PYTHONPATH="${BUILD_DIR}"/lib \ + esetup.py build_sphinx + fi +} + +python_test() { + distutils_install_for_testing + cd "${TEST_DIR}" || die + "${EPYTHON}" -c "import ${PN}, sys;r = ${PN}.test(verbose=True);sys.exit(r)" \ + || die "tests fail with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} |