summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-04-18 21:20:34 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-04-18 21:20:34 +0000
commita14c054ce1fdca051a56b877fd87c7e90714d339 (patch)
tree4f01bdc12f01a3eb48a41462f3c52cdcbc77d06f /dev-python/logilab-common
parentProvide static libraries per bug 266016. Provide pkg-config file to link stat... (diff)
downloadgentoo-2-a14c054ce1fdca051a56b877fd87c7e90714d339.tar.gz
gentoo-2-a14c054ce1fdca051a56b877fd87c7e90714d339.tar.bz2
gentoo-2-a14c054ce1fdca051a56b877fd87c7e90714d339.zip
Small fix by idl0r. Now astng and pylint shouldn't hit recursion limits anymore.
(Portage version: 2.2_rc30/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/logilab-common')
-rw-r--r--dev-python/logilab-common/ChangeLog10
-rw-r--r--dev-python/logilab-common/files/logilab-common-0.39.0-recursion.patch12
-rw-r--r--dev-python/logilab-common/logilab-common-0.39.0-r1.ebuild79
3 files changed, 100 insertions, 1 deletions
diff --git a/dev-python/logilab-common/ChangeLog b/dev-python/logilab-common/ChangeLog
index e06af385a4fb..02b62f9693ad 100644
--- a/dev-python/logilab-common/ChangeLog
+++ b/dev-python/logilab-common/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/logilab-common
# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.38 2009/04/18 18:46:07 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.39 2009/04/18 21:20:34 patrick Exp $
+
+*logilab-common-0.39.0-r1 (18 Apr 2009)
+
+ 18 Apr 2009; Patrick Lauer <patrick@gentoo.org>
+ +files/logilab-common-0.39.0-recursion.patch,
+ +logilab-common-0.39.0-r1.ebuild:
+ Small fix by idl0r. Now astng and pylint shouldn't hit recursion limits
+ anymore.
*logilab-common-0.39.0 (18 Apr 2009)
diff --git a/dev-python/logilab-common/files/logilab-common-0.39.0-recursion.patch b/dev-python/logilab-common/files/logilab-common-0.39.0-recursion.patch
new file mode 100644
index 000000000000..1ae05ac538b5
--- /dev/null
+++ b/dev-python/logilab-common/files/logilab-common-0.39.0-recursion.patch
@@ -0,0 +1,12 @@
+--- logilab-common-0.39.0/modutils.py 2009-03-25 09:47:08.000000000 +0100
++++ logilab-common-0.39.0/modutils.py 2009-04-18 22:03:10.000000000 +0200
+@@ -622,7 +622,7 @@ def _has_init(directory):
+ else return None
+ """
+ mod_or_pack = join(directory, '__init__')
+- for ext in PY_SOURCE_EXTS + ('.pyc', '.pyo'):
++ for ext in PY_SOURCE_EXTS + ('pyc', 'pyo'):
+ if exists(mod_or_pack + '.' + ext):
+- return mod_or_pack + ext
++ return mod_or_pack + '.' + ext
+ return None
diff --git a/dev-python/logilab-common/logilab-common-0.39.0-r1.ebuild b/dev-python/logilab-common/logilab-common-0.39.0-r1.ebuild
new file mode 100644
index 000000000000..689674b259d9
--- /dev/null
+++ b/dev-python/logilab-common/logilab-common-0.39.0-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/logilab-common-0.39.0-r1.ebuild,v 1.1 2009/04/18 21:20:34 patrick Exp $
+
+inherit distutils eutils python
+
+#DESCRIPTION="Several modules providing low level functionality shared among some python projects developed by logilab"
+DESCRIPTION="useful miscellaneous modules used by Logilab projects"
+HOMEPAGE="http://www.logilab.org/projects/common/"
+SRC_URI="ftp://ftp.logilab.org/pub/common/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="test"
+
+DEPEND="test? ( dev-python/egenix-mx-base )"
+RDEPEND=""
+
+PYTHON_MODNAME="logilab"
+
+# Extra documentation (html/pdf) needs some love
+src_unpack() {
+ distutils_src_unpack
+
+ epatch "${FILESDIR}/${P}-recursion.patch"
+}
+
+src_test() {
+ python_version
+
+ # Install temporarily.
+ local tpath="${T}/test"
+ local lpath="${tpath}/lib/python"
+
+ # setuptools would fail if the directory doesn't exist.
+ mkdir -p "${lpath}" || die
+
+ # We also have to add ${lpath} to PYTHONPATH else the installation would
+ # fail.
+ PYTHONPATH="${lpath}" ${python} setup.py install --home="${tpath}" || \
+ die "test copy failed"
+
+ # Get a rid of precompiled files to ensure we run our _modified_ tests
+ find ${lpath} -type f -name '*.pyc' -exec rm {} ';'
+
+ # Remove a botched tests.
+ # To support test w/o setuptools.
+ if [[ -d "${lpath}/${PN/-//}" ]]; then
+ pushd "${lpath}/${PN/-//}" >/dev/null || die
+ else
+ pushd "${lpath}/${P/-/_}-py${PYVER}.egg/${PN/-//}" >/dev/null || die
+ fi
+
+ epatch "${FILESDIR}/${P}-remove-broken-tests.patch"
+
+ # Bug 223079
+ if ! has userpriv ${FEATURES}; then
+ rm test/unittest_fileutils.py || die
+ fi
+
+ popd >/dev/null || die
+
+ # It picks up the tests relative to the current dir, so cd in. Do
+ # not cd in too far though (to logilab/common for example) or some
+ # relative/absolute module location tests fail.
+ pushd "${lpath}" >/dev/null || die
+ PYTHONPATH="${lpath}" ${python} "${tpath}/bin/pytest" -v || die "tests failed"
+ popd >/dev/null || die
+}
+
+src_install() {
+ distutils_src_install
+
+ doman doc/pytest.1 || die "doman failed"
+
+ # Remove unittests since they're just needed during build-time
+ rm -rf "${D}/$(python_get_sitedir)/${PN/-//}/test" || die
+}