diff options
author | Marien Zwart <marienz@gentoo.org> | 2007-03-02 01:57:49 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2007-03-02 01:57:49 +0000 |
commit | 23524a285efe381b92882ce1aa808b23667bbc34 (patch) | |
tree | 51bd287da9453b00b472122787a74c8a0dfbbf8e /dev-python/astng | |
parent | Stable for HPPA (bug #166309). (diff) | |
download | gentoo-2-23524a285efe381b92882ce1aa808b23667bbc34.tar.gz gentoo-2-23524a285efe381b92882ce1aa808b23667bbc34.tar.bz2 gentoo-2-23524a285efe381b92882ce1aa808b23667bbc34.zip |
Version bump, closing bug #168905, thanks to dsd@gentoo.org for reporting.
(Portage version: 2.1.2-r12)
Diffstat (limited to 'dev-python/astng')
-rw-r--r-- | dev-python/astng/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/astng/astng-0.17.0.ebuild | 65 | ||||
-rw-r--r-- | dev-python/astng/files/astng-0.17.0-test-fixes.patch | 45 | ||||
-rw-r--r-- | dev-python/astng/files/digest-astng-0.17.0 | 3 |
4 files changed, 120 insertions, 1 deletions
diff --git a/dev-python/astng/ChangeLog b/dev-python/astng/ChangeLog index 91b394032ccf..ef059a05f4c4 100644 --- a/dev-python/astng/ChangeLog +++ b/dev-python/astng/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/astng # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/ChangeLog,v 1.15 2007/02/21 18:11:33 lucass Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/ChangeLog,v 1.16 2007/03/02 01:57:49 marienz Exp $ + +*astng-0.17.0 (02 Mar 2007) + + 02 Mar 2007; Marien Zwart <marienz@gentoo.org> + +files/astng-0.17.0-test-fixes.patch, +astng-0.17.0.ebuild: + Version bump, closing bug #168905, thanks to dsd@gentoo.org for reporting. 21 Feb 2007; Lukasz Strzygowski <lucass@gentoo.org> Manifest: Fixed missing chksums. diff --git a/dev-python/astng/astng-0.17.0.ebuild b/dev-python/astng/astng-0.17.0.ebuild new file mode 100644 index 000000000000..e603ec46af86 --- /dev/null +++ b/dev-python/astng/astng-0.17.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.17.0.ebuild,v 1.1 2007/03/02 01:57:49 marienz Exp $ + +inherit distutils eutils + +DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages" +SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz" +HOMEPAGE="http://www.logilab.org/projects/astng/" + +IUSE="" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +LICENSE="GPL-2" +DEPEND=">=dev-lang/python-2.1 + >=dev-python/logilab-common-0.13-r1" + +S="${WORKDIR}/logilab-${P}" + + +src_unpack() { + unpack ${A} + cd "${S}" + + # Skip a failing test. + epatch "${FILESDIR}/${PN}-0.16.1-skip-gobject-test.patch" + + # Fix a typo (?) + epatch "${FILESDIR}/${P}-test-fixes.patch" +} + +src_install() { + distutils_src_install + python_version + # we need to remove this file because it collides with the one + # from logilab-common (which we depend on). + rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/logilab/__init__.py" +} + +src_test() { + python_version + + # Do a temporary install. + local spath="usr/$(get_libdir)/python${PYVER}/site-packages/" + + # This is a hack to make tests work without installing to the live + # filesystem. We copy part of the logilab site-packages to a temporary + # dir, install there, and run from there. + mkdir -p "${T}/test/${spath}/logilab" + cp -r "${ROOT}${spath}/logilab/common" "${T}/test/${spath}/logilab" \ + || die "copying logilab-common failed!" + + "${python}" setup.py install --root="${T}/test" || die "test copy failed" + + # Use a hacked up copy of pytest that exits nonzero on failure. + sed -e 's/exitafter=False/exitafter=True/' \ + < "${ROOT}usr/bin/pytest" > "${T}/pytest" || die "sed failed" + + # Pytest picks up tests relative to the current dir, so cd in. + pushd "${T}/test/${spath}/logilab/astng" >/dev/null + PYTHONPATH="${T}/test/${spath}" "${python}" "${T}/pytest" -v \ + || die "tests failed" + popd >/dev/null + rm -rf "${T}/test" +} diff --git a/dev-python/astng/files/astng-0.17.0-test-fixes.patch b/dev-python/astng/files/astng-0.17.0-test-fixes.patch new file mode 100644 index 000000000000..d79971752345 --- /dev/null +++ b/dev-python/astng/files/astng-0.17.0-test-fixes.patch @@ -0,0 +1,45 @@ +=== modified file 'test/regrtest.py' +--- test/regrtest.py 2007-03-02 01:24:23 +0000 ++++ test/regrtest.py 2007-03-02 01:33:52 +0000 +@@ -72,6 +72,10 @@ + + + def test_pylint_config_attr(self): ++ try: ++ from pylint import lint ++ except ImportError: ++ self.skip('pylint not available') + mod = m.astng_from_module_name('pylint.lint') + pylinter = mod['PyLinter'] + self.assertEquals([c.name for c in pylinter.ancestors()], + +=== modified file 'test/unittest_inference.py' +--- test/unittest_inference.py 2007-03-02 01:24:23 +0000 ++++ test/unittest_inference.py 2007-03-02 01:38:46 +0000 +@@ -635,8 +635,14 @@ + node = get_name_node(astng, 'open', -1) + infered = list(node.infer()) + self.failUnlessEqual(len(infered), 1) +- self.assertIsInstance(infered[0], nodes.Class) +- self.failUnlessEqual(infered[0].name, 'file') ++ if open is file: ++ # On python < 2.5 open and file are the same thing. ++ self.assertIsInstance(infered[0], nodes.Class) ++ self.failUnlessEqual(infered[0].name, 'file') ++ else: ++ # On python >= 2.5 open is a builtin function. ++ self.assertIsInstance(infered[0], nodes.Function) ++ self.failUnlessEqual(infered[0].name, 'open') + + def test_callfunc_context_inference(self): + data = ''' +@@ -739,7 +745,7 @@ + infered = list(astng.igetattr('x')) + self.failUnlessEqual(len(infered), 2) + value = [str(v) for v in infered] +- self.assertEquals(value, ['Instance of __main__.Yyarray', ++ self.assertEquals(value, ['Instance of %s.myarray' % (__name__,), + 'Instance of __builtin__.int']) + + if __name__ == '__main__': + diff --git a/dev-python/astng/files/digest-astng-0.17.0 b/dev-python/astng/files/digest-astng-0.17.0 new file mode 100644 index 000000000000..04653424c52c --- /dev/null +++ b/dev-python/astng/files/digest-astng-0.17.0 @@ -0,0 +1,3 @@ +MD5 29a89f58aebcf9e0f07f205e66aa2d6b logilab-astng-0.17.0.tar.gz 62202 +RMD160 7a869a756a511ba6c5fd82a1e575ee82b6ce7166 logilab-astng-0.17.0.tar.gz 62202 +SHA256 714e37cc12186f8b796fc5431678d9fab3eff0152a186b523b1fe7d7d183d15f logilab-astng-0.17.0.tar.gz 62202 |