diff options
author | Marien Zwart <marienz@gentoo.org> | 2006-01-11 16:02:06 +0000 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2006-01-11 16:02:06 +0000 |
commit | c07a63931363a7f4ae9d8e881147c5dba99a5fd1 (patch) | |
tree | d650abfeba5cc971754eb92ddf6c4ad90fa29bf4 /dev-python/logilab-common | |
parent | Get rid of copious output from compile script, which was drastically slowing (diff) | |
download | gentoo-2-c07a63931363a7f4ae9d8e881147c5dba99a5fd1.tar.gz gentoo-2-c07a63931363a7f4ae9d8e881147c5dba99a5fd1.tar.bz2 gentoo-2-c07a63931363a7f4ae9d8e881147c5dba99a5fd1.zip |
Bump version to 0.13.0, add src_test.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'dev-python/logilab-common')
6 files changed, 165 insertions, 13 deletions
diff --git a/dev-python/logilab-common/ChangeLog b/dev-python/logilab-common/ChangeLog index c16929cb46b5..25dc128dd1df 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-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.18 2005/11/05 20:15:10 lucass Exp $ +# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/ChangeLog,v 1.19 2006/01/11 16:02:06 marienz Exp $ + +*logilab-common-0.13.0 (11 Jan 2006) + + 11 Jan 2006; Marien Zwart <marienz@gentoo.org> + +files/logilab-common-0.13.0-configuration-help-test-less-strict.patch, + +files/logilab-common-0.13.0-dbapi-skip-tests.patch, + +logilab-common-0.13.0.ebuild: + Bump version to 0.13.0, add src_test. *logilab-common-0.12.0 (05 Nov 2005) diff --git a/dev-python/logilab-common/Manifest b/dev-python/logilab-common/Manifest index eb381db5f8d5..d14accc9028d 100644 --- a/dev-python/logilab-common/Manifest +++ b/dev-python/logilab-common/Manifest @@ -1,20 +1,14 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 7f2b20883f9d0690c4fc3dbde72f5068 ChangeLog 2762 +MD5 c19fcae5a9948f52bf4d1096983cbb3f ChangeLog 3052 MD5 3d47855a9c3abeeaacd705ff63e2499d files/digest-logilab-common-0.10.0 65 MD5 af0e585126bf2c86e2be032d330c7368 files/digest-logilab-common-0.12.0 65 +MD5 3f1b9bd57f733c35b7a950b575e6f6c2 files/digest-logilab-common-0.13.0 65 MD5 229d5c1c48d6d7a481231e941be3abc6 files/digest-logilab-common-0.5.0 63 MD5 532c5af1f9cb47abbf7283f6ba517826 files/digest-logilab-common-0.9.3 64 +MD5 2ffb9ac6967bf309c84dcfdd346f8d7c files/logilab-common-0.13.0-configuration-help-test-less-strict.patch 776 +MD5 d66ad0d8dd7f9d5712b47aa45cdf7083 files/logilab-common-0.13.0-dbapi-skip-tests.patch 3255 MD5 a55d8a892bae77097273d31368d8f02c logilab-common-0.10.0.ebuild 723 MD5 7601e2d066dcdaa761b5e8c7660cc9ce logilab-common-0.12.0.ebuild 773 +MD5 72850a29f761e98118f1814e1e872eb6 logilab-common-0.13.0.ebuild 1527 MD5 49e47ae120639f7eaed252393cd57f9c logilab-common-0.5.0.ebuild 627 MD5 3545fd8d38016d3e7aa7ce59ec1ca6a6 logilab-common-0.9.3.ebuild 719 MD5 71c4638c9c88af75b58e5f5cb54fe008 metadata.xml 159 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDbRL32jLqHNfbg2URAsUGAJ0Sf6ebBTj3gbi0UoawptWC/WDH5wCdEI1U -LcZGZ3BJRw9ptnKfFdmF/GE= -=ERHD ------END PGP SIGNATURE----- diff --git a/dev-python/logilab-common/files/digest-logilab-common-0.13.0 b/dev-python/logilab-common/files/digest-logilab-common-0.13.0 new file mode 100644 index 000000000000..ab6146f1c10b --- /dev/null +++ b/dev-python/logilab-common/files/digest-logilab-common-0.13.0 @@ -0,0 +1 @@ +MD5 9b6500c2a23660edfabe65bf73137a51 common-0.13.0.tar.gz 140530 diff --git a/dev-python/logilab-common/files/logilab-common-0.13.0-configuration-help-test-less-strict.patch b/dev-python/logilab-common/files/logilab-common-0.13.0-configuration-help-test-less-strict.patch new file mode 100644 index 000000000000..f4c30bccd7a1 --- /dev/null +++ b/dev-python/logilab-common/files/logilab-common-0.13.0-configuration-help-test-less-strict.patch @@ -0,0 +1,19 @@ +=== modified file 'test/unittest_configuration.py' +--- test/unittest_configuration.py ++++ test/unittest_configuration.py +@@ -145,7 +145,13 @@ + + def test_help(self): + self.cfg.add_help_section('bonus', 'a nice additional help') +- self.assertLinesEquals(self.cfg.help().strip(), """usage: Just do it ! (tm) ++ help = self.cfg.help().strip() ++ # at least in python 2.4.2 the output is: ++ # ' -v <string>, --value=<string>' ++ # it is not unlikely some optik/optparse versions do print -v<string> ++ # so accept both ++ help = help.replace(' -v <string>, ', ' -v<string>, ') ++ self.assertLinesEquals(help, """usage: Just do it ! (tm) + + options: + -h, --help show this help message and exit + diff --git a/dev-python/logilab-common/files/logilab-common-0.13.0-dbapi-skip-tests.patch b/dev-python/logilab-common/files/logilab-common-0.13.0-dbapi-skip-tests.patch new file mode 100644 index 000000000000..43a5d2c6551f --- /dev/null +++ b/dev-python/logilab-common/files/logilab-common-0.13.0-dbapi-skip-tests.patch @@ -0,0 +1,79 @@ +=== modified file 'test/unittest_db.py' +--- test/unittest_db.py ++++ test/unittest_db.py +@@ -92,9 +92,12 @@ + + def test_connection_wrap(self): + """Tests the connection wrapping""" +- cnx = get_connection('postgres', +- self.host, self.db, self.user, self.passwd, +- quiet=1) ++ try: ++ cnx = get_connection('postgres', ++ self.host, self.db, self.user, self.passwd, ++ quiet=1) ++ except ImportError: ++ self.skip('postgresql dbapi module not installed') + self.failIf(isinstance(cnx, PyConnection), + 'cnx should *not* be a PyConnection instance') + cnx = get_connection('postgres', +@@ -106,9 +109,12 @@ + + def test_cursor_wrap(self): + """Tests cursor wrapping""" +- cnx = get_connection('postgres', +- self.host, self.db, self.user, self.passwd, +- quiet=1, pywrap = True) ++ try: ++ cnx = get_connection('postgres', ++ self.host, self.db, self.user, self.passwd, ++ quiet=1, pywrap = True) ++ except ImportError: ++ self.skip('postgresql dbapi module not installed') + cursor = cnx.cursor() + self.failUnless(isinstance(cursor, PyCursor), + 'cnx should be a PyCursor instance') +@@ -134,8 +140,11 @@ + + def test_pgdb_types(self): + """Tests that NUMBER really wraps all number types""" +- set_prefered_driver('postgres', 'pgdb') +- module = get_dbapi_compliant_module('postgres') ++ set_prefered_driver('postgres', 'pgdb') ++ try: ++ module = get_dbapi_compliant_module('postgres') ++ except ImportError: ++ self.skip('python-pqsql is not installed') + number_types = 'int2', 'int4', 'serial', \ + 'int8', 'float4', 'float8', \ + 'numeric', 'bool', 'money' +@@ -146,16 +155,25 @@ + def test_pypgsql_getattr(self): + """Tests the getattr() delegation for pyPgSQL""" + set_prefered_driver('postgres', 'pyPgSQL.PgSQL') +- module = get_dbapi_compliant_module('postgres') ++ try: ++ module = get_dbapi_compliant_module('postgres') ++ except ImportError: ++ self.skip('python-pygresql is not installed') + try: + binary = module.BINARY + except AttributeError, err: + self.fail(str(err)) + + def test_adv_func_helper(self): +- module = get_dbapi_compliant_module('postgres') ++ try: ++ module = get_dbapi_compliant_module('postgres') ++ except ImportError: ++ self.skip('postgres dbapi module is not installed') + self.failUnless(isinstance(module.adv_func_helper, _PGAdvFuncHelper)) +- module = get_dbapi_compliant_module('sqlite') ++ try: ++ module = get_dbapi_compliant_module('sqlite') ++ except ImportError: ++ self.skip('pysqlite is not installed') + self.failUnless(isinstance(module.adv_func_helper, _GenericAdvFuncHelper)) + + + diff --git a/dev-python/logilab-common/logilab-common-0.13.0.ebuild b/dev-python/logilab-common/logilab-common-0.13.0.ebuild new file mode 100644 index 000000000000..a82c2323239b --- /dev/null +++ b/dev-python/logilab-common/logilab-common-0.13.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2006 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.13.0.ebuild,v 1.1 2006/01/11 16:02:06 marienz Exp $ + +inherit distutils + +DESCRIPTION="Several modules providing low level functionality shared among some python projects developed by logilab." +HOMEPAGE="http://www.logilab.org/projects/common/" +SRC_URI="ftp://ftp.logilab.org/pub/common/${P#logilab-}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86" +IUSE="doc" + +DEPEND="|| ( >=dev-python/optik-1.4 >=dev-lang/python-2.3 )" + +S=${WORKDIR}/${P#logilab-} + +PYTHON_MODNAME="logilab" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-dbapi-skip-tests.patch" + epatch "${FILESDIR}/${P}-configuration-help-test-less-strict.patch" + # the permissions for this file are 400 in the tarball for no + # obvious reason + chmod 444 test/data/noendingnewline.py || die "chmod failed" +} + +src_install() { + distutils_src_install + + if use doc; then + dohtml -r doc/html/* + fi +} + +src_test() { + # The tests will not work properly from the source dir, so do a + # temporary install: + python_version + local spath="test/usr/$(get_libdir)/python${PYVER}/site-packages/" + ${python} setup.py install --root="${T}/test" || die "test install failed" + # dir needs to be this or the tests fail + cd "${T}/${spath}/logilab/common/test" + PYTHONPATH="${T}/${spath}" "${python}" runtests.py || die "tests failed" + cd "${S}" + rm -rf "${T}/test" +} |