summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2014-04-01 11:17:49 +0000
committerIan Delaney <idella4@gentoo.org>2014-04-01 11:17:49 +0000
commit6e0b2d88221081b50642923888dfa22a7756bfa8 (patch)
tree0321f15d0f10f5deb6878458c478579f6d69fea9 /dev-python/bsddb3
parentAdd missing use depend, bug #505744. (diff)
downloadgentoo-2-6e0b2d88221081b50642923888dfa22a7756bfa8.tar.gz
gentoo-2-6e0b2d88221081b50642923888dfa22a7756bfa8.tar.bz2
gentoo-2-6e0b2d88221081b50642923888dfa22a7756bfa8.zip
install phase tidied, un-needed removal of tests folders removed, test phase revised and fixed for py3 due to flaws in the source code's setup, includes the patch. Fixes Bugs #493500 by Nikoli and #476246 by Patrick
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python/bsddb3')
-rw-r--r--dev-python/bsddb3/ChangeLog4
-rw-r--r--dev-python/bsddb3/bsddb3-6.0.1.ebuild39
-rw-r--r--dev-python/bsddb3/files/py3tests.patch340
3 files changed, 358 insertions, 25 deletions
diff --git a/dev-python/bsddb3/ChangeLog b/dev-python/bsddb3/ChangeLog
index 807d3dc1ef32..6f06f248183d 100644
--- a/dev-python/bsddb3/ChangeLog
+++ b/dev-python/bsddb3/ChangeLog
@@ -1,6 +1,6 @@
# ChangeLog for dev-python/bsddb3
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/bsddb3/ChangeLog,v 1.99 2014/01/15 12:41:37 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/bsddb3/ChangeLog,v 1.100 2014/04/01 11:17:49 idella4 Exp $
15 Jan 2014; Agostino Sarubbo <ago@gentoo.org> bsddb3-6.0.0.ebuild:
Stable for sparc, wrt bug #482056
@@ -47,7 +47,7 @@
28 May 2013; Ian Delaney <idella4@gentoo.org> +bsddb3-5.3.0-r1.ebuild,
bsddb3-5.3.0.ebuild:
- revbump, migrate -> distutils-r1, tes fail cited wrt Bug #470976
+ revbump, migrate -> distutils-r1, test fail cited wrt Bug #470976
02 Feb 2013; Agostino Sarubbo <ago@gentoo.org> bsddb3-5.3.0.ebuild:
Add ~arm, wrt bug #449220
diff --git a/dev-python/bsddb3/bsddb3-6.0.1.ebuild b/dev-python/bsddb3/bsddb3-6.0.1.ebuild
index bad1ac7bcd0f..f503723b4b0a 100644
--- a/dev-python/bsddb3/bsddb3-6.0.1.ebuild
+++ b/dev-python/bsddb3/bsddb3-6.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/bsddb3/bsddb3-6.0.1.ebuild,v 1.1 2014/01/08 05:47:34 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/bsddb3/bsddb3-6.0.1.ebuild,v 1.2 2014/04/01 11:17:49 idella4 Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
@@ -20,10 +20,10 @@ RDEPEND=">=sys-libs/db-4.8.30"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
+# PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-DOCS=( ChangeLog TODO.txt )
DISTUTILS_IN_SOURCE_BUILD=1
+PATCHES=( "${FILESDIR}"/py3tests.patch )
src_configure() {
local DB_VER
@@ -45,31 +45,24 @@ src_compile() {
}
python_test() {
- # https://sourceforge.net/p/pybsddb/bugs/72/
+ # py3 tests misfire in the source om running test_all.py
+ local test
pushd "${BUILD_DIR}"/../ > /dev/null
if [[ "${EPYTHON}" == python2* ]]; then
- "${PYTHON}" build/lib/bsddb3/tests/test_all.py
- elif [[ "${EPYTHON}" == python3* ]]; then
- if [[ "${EPYTHON}" == 'python3.3' ]]; then
- einfo "py3.3 has an internal problem within this ebuild but is known to pass tests"
- else
- "${PYTHON}" setup.py build
- einfo "all 500 tests are run silently and may take a number of minutes to complete"
- "${PYTHON}" -v test3.py || die
- fi
+ einfo "all 500 tests are run silently and may take a number of minutes to complete"
+ "${PYTHON}" build/lib/bsddb3/tests/test_all.py || die "tests failed under ${EPYTHON}"
+ elif python_is_python3; then
+ mv Lib3/bsddb/test/test_all.py . || die
+ for test in Lib3/bsddb/test/test_*
+ do
+ "${PYTHON}" $test || die "tet $test failed under ${EPYTHON}"
+ einfo "test $test passed OK";einfo ""
+ done
fi
-}
-
-python_install() {
- rm -fr "${ED}$(python_get_sitedir)/bsddb3/tests"
-
- if use doc; then
- dohtml -r docs/html/* || die "dohtml failed"
- fi
- distutils-r1_python_install
+ popd > /dev/null
}
python_install_all() {
- local HTML_DOCS=( docs/html/. )
+ use doc && local HTML_DOCS=( docs/html/. )
distutils-r1_python_install_all
}
diff --git a/dev-python/bsddb3/files/py3tests.patch b/dev-python/bsddb3/files/py3tests.patch
new file mode 100644
index 000000000000..2970bd851dfe
--- /dev/null
+++ b/dev-python/bsddb3/files/py3tests.patch
@@ -0,0 +1,340 @@
+The code for running tests under py3 is flawed in 2 distinct areas for running tests in the source.
+This patch corrects use of local import syntax in tests under Lib3/, the libs for py3.
+The other appears a typo or an oversight; entry of suite instead of test_suite in 1 test file.
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_associate.py bsddb3-6.0.1/Lib3/bsddb/test/test_associate.py
+--- Lib3/bsddb/test/test_associate.py 2013-12-05 03:52:00.000000000 +0800
++++ Lib3/bsddb/test/test_associate.py 2014-04-01 16:30:39.219546604 +0800
+@@ -42,7 +42,7 @@
+ from pprint import pprint
+
+ import unittest
+-from .test_all import db, dbshelve, test_support, verbose, have_threads, \
++from test_all import db, dbshelve, test_support, verbose, have_threads, \
+ get_new_environment_path
+
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_basics.py bsddb3-6.0.1/Lib3/bsddb/test/test_basics.py
+--- Lib3/bsddb/test/test_basics.py 2013-12-05 03:51:55.000000000 +0800
++++ Lib3/bsddb/test/test_basics.py 2014-04-01 16:30:39.223546604 +0800
+@@ -46,7 +46,7 @@
+ import time
+ import sys
+
+-from .test_all import db, test_support, verbose, get_new_environment_path, \
++from test_all import db, test_support, verbose, get_new_environment_path, \
+ get_new_database_path
+
+ DASH = '-'
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_compare.py bsddb3-6.0.1/Lib3/bsddb/test/test_compare.py
+--- Lib3/bsddb/test/test_compare.py 2013-12-05 03:52:05.000000000 +0800
++++ Lib3/bsddb/test/test_compare.py 2014-04-01 16:32:43.704544030 +0800
+@@ -38,12 +38,12 @@
+ """
+
+ import sys, os, re
+-from . import test_all
++import test_all
+ from io import StringIO
+
+ import unittest
+
+-from .test_all import db, dbshelve, test_support, \
++from test_all import db, dbshelve, test_support, \
+ get_new_environment_path, get_new_database_path
+
+
+@@ -479,4 +479,4 @@
+ return res
+
+ if __name__ == '__main__':
+- unittest.main(defaultTest = 'suite')
++ unittest.main(defaultTest = 'test_suite')
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_compat.py bsddb3-6.0.1/Lib3/bsddb/test/test_compat.py
+--- Lib3/bsddb/test/test_compat.py 2013-12-05 03:51:41.000000000 +0800
++++ Lib3/bsddb/test/test_compat.py 2014-04-01 16:30:39.225546604 +0800
+@@ -41,7 +41,7 @@
+ import os, string
+ import unittest
+
+-from .test_all import db, hashopen, btopen, rnopen, verbose, \
++from test_all import db, hashopen, btopen, rnopen, verbose, \
+ get_new_database_path
+
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_cursor_pget_bug.py bsddb3-6.0.1/Lib3/bsddb/test/test_cursor_pget_bug.py
+--- Lib3/bsddb/test/test_cursor_pget_bug.py 2013-12-05 03:51:53.000000000 +0800
++++ Lib3/bsddb/test/test_cursor_pget_bug.py 2014-04-01 16:30:39.225546604 +0800
+@@ -36,7 +36,7 @@
+ import unittest
+ import os, glob
+
+-from .test_all import db, test_support, get_new_environment_path, \
++from test_all import db, test_support, get_new_environment_path, \
+ get_new_database_path
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbenv.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbenv.py
+--- Lib3/bsddb/test/test_dbenv.py 2013-12-05 03:52:09.000000000 +0800
++++ Lib3/bsddb/test/test_dbenv.py 2014-04-01 16:30:39.227546604 +0800
+@@ -36,7 +36,7 @@
+ import unittest
+ import os, glob
+
+-from .test_all import db, test_support, get_new_environment_path, \
++from test_all import db, test_support, get_new_environment_path, \
+ get_new_database_path
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbobj.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbobj.py
+--- Lib3/bsddb/test/test_dbobj.py 2013-12-05 03:51:52.000000000 +0800
++++ Lib3/bsddb/test/test_dbobj.py 2014-04-01 16:30:39.227546604 +0800
+@@ -37,7 +37,7 @@
+ import os, string
+ import unittest
+
+-from .test_all import db, dbobj, test_support, get_new_environment_path, \
++from test_all import db, dbobj, test_support, get_new_environment_path, \
+ get_new_database_path
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_db.py bsddb3-6.0.1/Lib3/bsddb/test/test_db.py
+--- Lib3/bsddb/test/test_db.py 2013-12-05 03:52:12.000000000 +0800
++++ Lib3/bsddb/test/test_db.py 2014-04-01 16:30:39.228546604 +0800
+@@ -36,7 +36,7 @@
+ import unittest
+ import os, glob
+
+-from .test_all import db, test_support, get_new_environment_path, \
++from test_all import db, test_support, get_new_environment_path, \
+ get_new_database_path
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbshelve.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbshelve.py
+--- Lib3/bsddb/test/test_dbshelve.py 2013-12-05 03:52:04.000000000 +0800
++++ Lib3/bsddb/test/test_dbshelve.py 2014-04-01 16:30:39.229546604 +0800
+@@ -42,7 +42,7 @@
+ import unittest
+
+
+-from .test_all import db, dbshelve, test_support, verbose, \
++from test_all import db, dbshelve, test_support, verbose, \
+ get_new_environment_path, get_new_database_path
+
+
+@@ -73,14 +73,14 @@
+
+ def setUp(self):
+ if sys.version_info[0] >= 3 :
+- from .test_all import do_proxy_db_py3k
++ from test_all import do_proxy_db_py3k
+ self._flag_proxy_db_py3k = do_proxy_db_py3k(False)
+ self.filename = get_new_database_path()
+ self.do_open()
+
+ def tearDown(self):
+ if sys.version_info[0] >= 3 :
+- from .test_all import do_proxy_db_py3k
++ from test_all import do_proxy_db_py3k
+ do_proxy_db_py3k(self._flag_proxy_db_py3k)
+ self.do_close()
+ test_support.unlink(self.filename)
+@@ -340,7 +340,7 @@
+
+ def tearDown(self):
+ if sys.version_info[0] >= 3 :
+- from .test_all import do_proxy_db_py3k
++ from test_all import do_proxy_db_py3k
+ do_proxy_db_py3k(self._flag_proxy_db_py3k)
+ self.do_close()
+ test_support.rmtree(self.homeDir)
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_dbtables.py bsddb3-6.0.1/Lib3/bsddb/test/test_dbtables.py
+--- Lib3/bsddb/test/test_dbtables.py 2013-12-05 03:51:49.000000000 +0800
++++ Lib3/bsddb/test/test_dbtables.py 2014-04-01 16:30:39.231546604 +0800
+@@ -32,7 +32,7 @@
+ import pickle
+
+ import unittest
+-from .test_all import db, dbtables, test_support, verbose, \
++from test_all import db, dbtables, test_support, verbose, \
+ get_new_environment_path, get_new_database_path
+
+ #----------------------------------------------------------------------
+@@ -43,7 +43,7 @@
+ def setUp(self):
+ import sys
+ if sys.version_info[0] >= 3 :
+- from .test_all import do_proxy_db_py3k
++ from test_all import do_proxy_db_py3k
+ self._flag_proxy_db_py3k = do_proxy_db_py3k(False)
+
+ self.testHomeDir = get_new_environment_path()
+@@ -54,7 +54,7 @@
+ self.tdb.close()
+ import sys
+ if sys.version_info[0] >= 3 :
+- from .test_all import do_proxy_db_py3k
++ from test_all import do_proxy_db_py3k
+ do_proxy_db_py3k(self._flag_proxy_db_py3k)
+ test_support.rmtree(self.testHomeDir)
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_distributed_transactions.py bsddb3-6.0.1/Lib3/bsddb/test/test_distributed_transactions.py
+--- Lib3/bsddb/test/test_distributed_transactions.py 2013-12-05 03:51:40.000000000 +0800
++++ Lib3/bsddb/test/test_distributed_transactions.py 2014-04-01 16:30:39.231546604 +0800
+@@ -39,10 +39,10 @@
+ import os
+ import unittest
+
+-from .test_all import db, test_support, get_new_environment_path, \
++from test_all import db, test_support, get_new_environment_path, \
+ get_new_database_path
+
+-from .test_all import verbose
++from test_all import verbose
+
+ #----------------------------------------------------------------------
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_early_close.py bsddb3-6.0.1/Lib3/bsddb/test/test_early_close.py
+--- Lib3/bsddb/test/test_early_close.py 2013-12-05 03:51:47.000000000 +0800
++++ Lib3/bsddb/test/test_early_close.py 2014-04-01 16:30:39.232546604 +0800
+@@ -40,7 +40,7 @@
+ import os, sys
+ import unittest
+
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
++from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
+
+ # We're going to get warnings in this module about trying to close the db when
+ # its env is already closed. Let's just ignore those.
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_fileid.py bsddb3-6.0.1/Lib3/bsddb/test/test_fileid.py
+--- Lib3/bsddb/test/test_fileid.py 2013-12-05 03:51:44.000000000 +0800
++++ Lib3/bsddb/test/test_fileid.py 2014-04-01 16:30:39.233546604 +0800
+@@ -40,7 +40,7 @@
+ import shutil
+ import unittest
+
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from test_all import db, test_support, get_new_environment_path, get_new_database_path
+
+ class FileidResetTestCase(unittest.TestCase):
+ def setUp(self):
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_get_none.py bsddb3-6.0.1/Lib3/bsddb/test/test_get_none.py
+--- Lib3/bsddb/test/test_get_none.py 2013-12-05 03:51:56.000000000 +0800
++++ Lib3/bsddb/test/test_get_none.py 2014-04-01 16:30:39.233546604 +0800
+@@ -40,7 +40,7 @@
+ import os, string
+ import unittest
+
+-from .test_all import db, verbose, get_new_database_path
++from test_all import db, verbose, get_new_database_path
+
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_join.py bsddb3-6.0.1/Lib3/bsddb/test/test_join.py
+--- Lib3/bsddb/test/test_join.py 2013-12-05 03:51:46.000000000 +0800
++++ Lib3/bsddb/test/test_join.py 2014-04-01 16:30:39.234546604 +0800
+@@ -40,7 +40,7 @@
+
+ import unittest
+
+-from .test_all import db, dbshelve, test_support, verbose, \
++from test_all import db, dbshelve, test_support, verbose, \
+ get_new_environment_path, get_new_database_path
+
+ #----------------------------------------------------------------------
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_lock.py bsddb3-6.0.1/Lib3/bsddb/test/test_lock.py
+--- Lib3/bsddb/test/test_lock.py 2013-12-05 03:52:03.000000000 +0800
++++ Lib3/bsddb/test/test_lock.py 2014-04-01 16:30:39.234546604 +0800
+@@ -40,7 +40,7 @@
+ import time
+
+ import unittest
+-from .test_all import db, test_support, verbose, have_threads, \
++from test_all import db, test_support, verbose, have_threads, \
+ get_new_environment_path, get_new_database_path
+
+ if have_threads :
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_misc.py bsddb3-6.0.1/Lib3/bsddb/test/test_misc.py
+--- Lib3/bsddb/test/test_misc.py 2013-12-05 03:51:48.000000000 +0800
++++ Lib3/bsddb/test/test_misc.py 2014-04-01 16:30:39.235546604 +0800
+@@ -39,7 +39,7 @@
+ import os, sys
+ import unittest
+
+-from .test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path
++from test_all import db, dbshelve, hashopen, test_support, get_new_environment_path, get_new_database_path
+
+ #----------------------------------------------------------------------
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_pickle.py bsddb3-6.0.1/Lib3/bsddb/test/test_pickle.py
+--- Lib3/bsddb/test/test_pickle.py 2013-12-05 03:51:41.000000000 +0800
++++ Lib3/bsddb/test/test_pickle.py 2014-04-01 16:30:39.235546604 +0800
+@@ -47,7 +47,7 @@
+
+ import unittest
+
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from test_all import db, test_support, get_new_environment_path, get_new_database_path
+
+ #----------------------------------------------------------------------
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_queue.py bsddb3-6.0.1/Lib3/bsddb/test/test_queue.py
+--- Lib3/bsddb/test/test_queue.py 2013-12-05 03:51:50.000000000 +0800
++++ Lib3/bsddb/test/test_queue.py 2014-04-01 16:30:39.236546604 +0800
+@@ -41,7 +41,7 @@
+ from pprint import pprint
+ import unittest
+
+-from .test_all import db, verbose, get_new_database_path
++from test_all import db, verbose, get_new_database_path
+
+ #----------------------------------------------------------------------
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_recno.py bsddb3-6.0.1/Lib3/bsddb/test/test_recno.py
+--- Lib3/bsddb/test/test_recno.py 2013-12-05 03:52:01.000000000 +0800
++++ Lib3/bsddb/test/test_recno.py 2014-04-01 16:30:39.237546604 +0800
+@@ -41,7 +41,7 @@
+ from pprint import pprint
+ import unittest
+
+-from .test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
++from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
+
+ letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_replication.py bsddb3-6.0.1/Lib3/bsddb/test/test_replication.py
+--- Lib3/bsddb/test/test_replication.py 2013-12-05 03:51:58.000000000 +0800
++++ Lib3/bsddb/test/test_replication.py 2014-04-01 16:30:39.239546604 +0800
+@@ -40,7 +40,7 @@
+ import time
+ import unittest
+
+-from .test_all import db, test_support, have_threads, verbose, \
++from test_all import db, test_support, have_threads, verbose, \
+ get_new_environment_path, get_new_database_path
+
+
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_sequence.py bsddb3-6.0.1/Lib3/bsddb/test/test_sequence.py
+--- Lib3/bsddb/test/test_sequence.py 2013-12-05 03:51:51.000000000 +0800
++++ Lib3/bsddb/test/test_sequence.py 2014-04-01 16:30:39.239546604 +0800
+@@ -36,7 +36,7 @@
+ import unittest
+ import os
+
+-from .test_all import db, test_support, get_new_environment_path, get_new_database_path
++from test_all import db, test_support, get_new_environment_path, get_new_database_path
+
+
+ class DBSequenceTest(unittest.TestCase):
+diff -ur bsddb3-6.0.1.orig/Lib3/bsddb/test/test_thread.py bsddb3-6.0.1/Lib3/bsddb/test/test_thread.py
+--- Lib3/bsddb/test/test_thread.py 2013-12-05 03:51:39.000000000 +0800
++++ Lib3/bsddb/test/test_thread.py 2014-04-01 16:30:39.241546604 +0800
+@@ -51,7 +51,7 @@
+ pass
+
+ import unittest
+-from .test_all import db, dbutils, test_support, verbose, have_threads, \
++from test_all import db, dbutils, test_support, verbose, have_threads, \
+ get_new_environment_path, get_new_database_path
+
+ if have_threads :
+