summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2012-11-19 07:38:41 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2012-11-19 07:38:41 +0000
commit9b697f17f2393e104dfc1d96b699601450c4c3f3 (patch)
tree7cd4ab81c26422215d81136699d4c759a0708fa8 /sci-astronomy
parentInstalling more headers (diff)
downloadgentoo-2-9b697f17f2393e104dfc1d96b699601450c4c3f3.tar.gz
gentoo-2-9b697f17f2393e104dfc1d96b699601450c4c3f3.tar.bz2
gentoo-2-9b697f17f2393e104dfc1d96b699601450c4c3f3.zip
Drop inherit of eutils.eclass, introduce new dependencies for tests, simplify doc_compile, run tests, fix doc install path wrt #443876 by Diego Elio Pettenò <flameeyes@gentoo.org>, don't install tests
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0x5D21B852895192F9)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/pyephem/ChangeLog7
-rw-r--r--sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild36
2 files changed, 35 insertions, 8 deletions
diff --git a/sci-astronomy/pyephem/ChangeLog b/sci-astronomy/pyephem/ChangeLog
index 529bc3b10b90..dc8bdb687f8d 100644
--- a/sci-astronomy/pyephem/ChangeLog
+++ b/sci-astronomy/pyephem/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-astronomy/pyephem
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/pyephem/ChangeLog,v 1.18 2012/08/05 19:20:35 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/pyephem/ChangeLog,v 1.19 2012/11/19 07:38:41 xarthisius Exp $
+
+ 19 Nov 2012; Kacper Kowalik <xarthisius@gentoo.org> pyephem-3.7.5.1.ebuild:
+ Drop inherit of eutils.eclass, introduce new dependencies for tests, simplify
+ doc_compile, run tests, fix doc install path wrt #443876 by Diego Elio Pettenò
+ <flameeyes@gentoo.org>, don't install tests
05 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> -pyephem-3.7.4.1.ebuild,
metadata.xml:
diff --git a/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild b/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild
index ab874da60ef9..09c1da6e07de 100644
--- a/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild
+++ b/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild
@@ -1,24 +1,29 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild,v 1.3 2012/08/05 19:18:28 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/pyephem/pyephem-3.7.5.1.ebuild,v 1.4 2012/11/19 07:38:41 xarthisius Exp $
EAPI=4
+
PYTHON_DEPEND="2:2.5"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="2.4 3.* *-jython 2.7-pypy-*"
-inherit distutils eutils
+inherit distutils
DESCRIPTION="Astronomical routines for the python programming language"
-LICENSE="LGPL-3"
HOMEPAGE="http://rhodesmill.org/pyephem/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
IUSE="doc"
+
+DEPEND="doc? ( dev-python/sphinx )
+ test? ( || ( dev-lang/python:2.7 dev-python/unittest2 ) )"
RDEPEND=""
-DEPEND="doc? ( dev-python/sphinx )"
+
+PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
src_prepare() {
# don't install rst files
@@ -29,12 +34,29 @@ src_prepare() {
src_compile() {
distutils_src_compile
if use doc; then
- cd src/ephem/doc
- PYTHONPATH=../../.. emake html
+ PYTHONPATH=. emake -C src/ephem/doc html
fi
}
+src_test() {
+ testing() {
+ if [[ ${PYTHON_ABI} == "2.7" ]]; then
+ PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" \
+ "$(PYTHON)" -m unittest discover -s src/ephem
+ else
+ PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" \
+ unit2-${PYTHON_ABI} discover -s src/ephem
+ fi
+ }
+ python_execute_function testing
+}
+
src_install() {
distutils_src_install
- use doc && dohtml -r src/ephem/doc/.build/html/*
+ use doc && dohtml -r src/ephem/doc/_build/html/*
+
+ delete_tests() {
+ rm -rf "${ED}$(python_get_sitedir)/ephem/tests"
+ }
+ python_execute_function -q delete_tests
}