diff options
Diffstat (limited to 'dev-python/snakeoil/snakeoil-9999.ebuild')
-rw-r--r-- | dev-python/snakeoil/snakeoil-9999.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-python/snakeoil/snakeoil-9999.ebuild b/dev-python/snakeoil/snakeoil-9999.ebuild new file mode 100644 index 000000000000..ccde9c356182 --- /dev/null +++ b/dev-python/snakeoil/snakeoil-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/snakeoil-9999.ebuild,v 1.1 2011/08/06 08:51:38 ferringb Exp $ + +EAPI="2" +SUPPORT_PYTHON_ABIS="1" + +EGIT_REPO_URI="http://googlecode.com/p/snakeoil" +inherit distutils git-2 + +DESCRIPTION="Miscellaneous python utility code." +HOMEPAGE="http://snakeoil.googlecode.com/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND="!<sys-apps/pkgcore-0.4.7.8" +RDEPEND=${DEPEND} + +DOCS="AUTHORS NEWS" + +pkg_setup() { + # disable snakeoil 2to3 caching + unset PY2TO3_CACHEDIR + python_pkg_setup + + # A hack to install for all versions of Python in the system. + # pkgcore needs it to support upgrading to a different Python slot. + PYTHON_ABIS="" + local python_interpreter + for python_interpreter in /usr/bin/python{2.[4-9],3.[1-9]}; do + if [[ -x "${python_interpreter}" ]]; then + PYTHON_ABIS+=" ${python_interpreter#/usr/bin/python}" + fi + done + export PYTHON_ABIS="${PYTHON_ABIS# }" +} + +src_test() { + testing() { + local tempdir + tempdir="${T}/tests/python-${PYTHON_ABI}" + mkdir -p "${tempdir}" || die "tempdir creation failed" + cp -r "${S}" "${tempdir}" || die "test copy failed" + cd "${tempdir}/${P}" + PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" test + } + python_execute_function testing +} |