summaryrefslogtreecommitdiff
path: root/dev-python/nose
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/nose
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/nose')
-rw-r--r--dev-python/nose/Manifest1
-rw-r--r--dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch20
-rw-r--r--dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch54
-rw-r--r--dev-python/nose/files/nose-1.3.7-python-3.6-test.patch67
-rw-r--r--dev-python/nose/metadata.xml17
-rw-r--r--dev-python/nose/nose-1.3.7-r4.ebuild101
-rw-r--r--dev-python/nose/nose-1.3.7-r5.ebuild85
7 files changed, 345 insertions, 0 deletions
diff --git a/dev-python/nose/Manifest b/dev-python/nose/Manifest
new file mode 100644
index 000000000000..ea56763f9479
--- /dev/null
+++ b/dev-python/nose/Manifest
@@ -0,0 +1 @@
+DIST nose-1.3.7.tar.gz 280488 BLAKE2B 4bb479b2786f813f9e9a5fd401e30023a473a053ae013d7887be15af415422c09fb399af6058ae99ed65c5fa4da84eb274eb805e895ca74db159d952905f5be4 SHA512 e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62
diff --git a/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch b/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch
new file mode 100644
index 000000000000..87577871b613
--- /dev/null
+++ b/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch
@@ -0,0 +1,20 @@
+--- a/nose/plugins/cover.py 2016-10-11 15:51:26.990868010 +0200
++++ b/nose/plugins/cover.py 2016-10-11 15:52:28.261102027 +0200
+@@ -187,7 +187,7 @@
+ for name, module in sys.modules.items()
+ if self.wantModuleCoverage(name, module)]
+ log.debug("Coverage report will cover modules: %s", modules)
+- self.coverInstance.report(modules, file=stream)
++ self.coverInstance.report(modules, file=stream, show_missing=True)
+
+ import coverage
+ if self.coverHtmlDir:
+@@ -207,7 +207,7 @@
+ # make sure we have minimum required coverage
+ if self.coverMinPercentage:
+ f = StringIO.StringIO()
+- self.coverInstance.report(modules, file=f)
++ self.coverInstance.report(modules, file=f, show_missing=True)
+
+ multiPackageRe = (r'-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?'
+ r'\s+(\d+)%\s+\d*\s{0,1}$')
diff --git a/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch b/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch
new file mode 100644
index 000000000000..8d2f2f05dc29
--- /dev/null
+++ b/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch
@@ -0,0 +1,54 @@
+From 8e7ad3d50012688ca029d126cbc88251831fea88 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Mon, 1 Feb 2016 00:05:30 +0300
+Subject: [PATCH 1/2] Set __qualname__ equal to __name__ on derived classes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To make output on Python ≥ 3.5 the same as on previous Python versions.
+
+This fixes #928.
+---
+ functional_tests/test_load_tests_from_test_case.py | 1 +
+ nose/util.py | 1 +
+ unit_tests/test_xunit.py | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/functional_tests/test_load_tests_from_test_case.py b/functional_tests/test_load_tests_from_test_case.py
+index 42f8563..13d0c8a 100644
+--- a/functional_tests/test_load_tests_from_test_case.py
++++ b/functional_tests/test_load_tests_from_test_case.py
+@@ -29,6 +29,7 @@ def setUp(self):
+ pass
+ def tearDown(self):
+ pass
++ Derived.__qualname__ = Derived.__name__
+ # must use nose loader here because the default loader in 2.3
+ # won't load tests from base classes
+ l = loader.TestLoader()
+diff --git a/nose/util.py b/nose/util.py
+index bfe1658..80ab1d4 100644
+--- a/nose/util.py
++++ b/nose/util.py
+@@ -643,6 +643,7 @@ class C(cls):
+ pass
+ C.__module__ = module
+ C.__name__ = cls.__name__
++ C.__qualname__ = cls.__name__
+ return C
+
+
+diff --git a/unit_tests/test_xunit.py b/unit_tests/test_xunit.py
+index 944d285..261436b 100644
+--- a/unit_tests/test_xunit.py
++++ b/unit_tests/test_xunit.py
+@@ -16,6 +16,7 @@ def mktest():
+ class TC(unittest.TestCase):
+ def runTest(self):
+ pass
++ TC.__qualname__ = TC.__name__
+ test = TC()
+ return test
+
+
diff --git a/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch
new file mode 100644
index 000000000000..eda10ff036cf
--- /dev/null
+++ b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch
@@ -0,0 +1,67 @@
+From 84bb82245d10798825439dc13846eb0538d84239 Mon Sep 17 00:00:00 2001
+From: Tomas Orsava <torsava@redhat.com>
+Date: Mon, 12 Dec 2016 14:35:50 +0100
+Subject: [PATCH] Fix compatibility with Python 3.6
+
+Python 3.6 returns ModuleNotFoundError instead of the previous ImportError.
+https://github.com/nose-devs/nose/pull/1029
+---
+ functional_tests/test_loader.py | 2 +-
+ functional_tests/test_withid_failures.rst | 12 ++++++------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/functional_tests/test_loader.py b/functional_tests/test_loader.py
+index 104f220..906e2ba 100644
+--- a/functional_tests/test_loader.py
++++ b/functional_tests/test_loader.py
+@@ -372,7 +372,7 @@ def test_failed_import_module_name(self):
+ assert res.errors, "Expected errors but got none"
+ assert not res.failures, res.failures
+ err = res.errors[0][0].test.exc_class
+- assert err is ImportError, \
++ assert issubclass(err, ImportError), \
+ "Expected import error, got %s" % err
+
+ def test_load_nonsense_name(self):
+diff --git a/functional_tests/test_withid_failures.rst b/functional_tests/test_withid_failures.rst
+index cf09d4f..cb20886 100644
+--- a/functional_tests/test_withid_failures.rst
++++ b/functional_tests/test_withid_failures.rst
+@@ -7,16 +7,16 @@
+ >>> support = os.path.join(os.path.dirname(__file__), 'support', 'id_fails')
+ >>> argv = [__file__, '-v', '--with-id', '--id-file', idfile, support]
+ >>> run(argv=argv, plugins=[TestId()]) # doctest: +ELLIPSIS
+- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR
+ #2 test_b.test ... ok
+ #3 test_b.test_fail ... FAIL
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...: No module ...apackagethatdoesntexist...
+ <BLANKLINE>
+ ======================================================================
+ FAIL: test_b.test_fail
+@@ -35,14 +35,14 @@ Addressing failures works (sometimes).
+ >>> argv.append('1')
+ >>> _junk = sys.modules.pop('test_a', None) # 2.3 requires
+ >>> run(argv=argv, plugins=[TestId()]) #doctest: +ELLIPSIS
+- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...: No module ...apackagethatdoesntexist...
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 1 test in ...s
diff --git a/dev-python/nose/metadata.xml b/dev-python/nose/metadata.xml
new file mode 100644
index 000000000000..89e3db168098
--- /dev/null
+++ b/dev-python/nose/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">nose</remote-id>
+ <remote-id type="github">nose-devs/nose</remote-id>
+ </upstream>
+ <use>
+ <flag name="coverage">Pull in <pkg>dev-python/coverage</pkg> needed
+ for nose-xcover plugin.</flag>
+ </use>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/nose/nose-1.3.7-r4.ebuild b/dev-python/nose/nose-1.3.7-r4.ebuild
new file mode 100644
index 000000000000..4c1588f59bce
--- /dev/null
+++ b/dev-python/nose/nose-1.3.7-r4.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring"
+HOMEPAGE="
+ https://pypi.org/project/nose/
+ https://nose.readthedocs.io/en/latest/
+ https://github.com/nose-devs/nose"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="coverage doc examples test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ doc? ( || ( $(python_gen_useflags 'python2*') ) )"
+
+RDEPEND="
+ coverage? ( dev-python/coverage[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/sphinx-0.6[$(python_gen_usedep 'python2*')] )
+ test? (
+ dev-python/coverage[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/twisted[${PYTHON_USEDEP}]
+ ' python2_7 python3_{6,7,8})
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python-3.5-backport.patch
+
+ # Patch against master found in an upstream PR, backported:
+ # https://github.com/nose-devs/nose/pull/1004
+ "${FILESDIR}"/${P}-coverage-4.1-support.patch
+
+ "${FILESDIR}"/${P}-python-3.6-test.patch
+)
+
+pkg_setup() {
+ use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
+}
+
+python_prepare_all() {
+ # Tests need to be converted, and they don't respect BUILD_DIR.
+ use test && DISTUTILS_IN_SOURCE_BUILD=1
+
+ # Disable tests requiring network connection.
+ sed \
+ -e "s/test_resolve/_&/g" \
+ -e "s/test_raises_bad_return/_&/g" \
+ -e "s/test_raises_twisted_error/_&/g" \
+ -i unit_tests/test_twisted.py || die "sed failed"
+ # Disable versioning of nosetests script to avoid collision with
+ # versioning performed by the eclass.
+ sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \
+ -i setup.py || die "sed2 failed"
+
+ # Prevent un-needed d'loading during doc build
+ sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ local add_targets=()
+
+ if use test; then
+ add_targets+=( egg_info )
+ python_is_python3 && add_targets+=( build_tests )
+ fi
+
+ distutils-r1_python_compile ${add_targets[@]}
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ "${EPYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install --install-data "${EPREFIX}/usr/share"
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+ use doc && HTML_DOCS=( doc/.build/html/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/nose/nose-1.3.7-r5.ebuild b/dev-python/nose/nose-1.3.7-r5.ebuild
new file mode 100644
index 000000000000..0b0eda13af04
--- /dev/null
+++ b/dev-python/nose/nose-1.3.7-r5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring"
+HOMEPAGE="
+ https://pypi.org/project/nose/
+ https://nose.readthedocs.io/en/latest/
+ https://github.com/nose-devs/nose"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="coverage examples test"
+RESTRICT="!test? ( test )"
+
+COV_DEP="
+ $(python_gen_cond_dep '
+ dev-python/coverage[${PYTHON_USEDEP}]
+ ' python2_7 python3_{6,7,8} pypy3)"
+RDEPEND="
+ coverage? ( ${COV_DEP} )"
+DEPEND="${RDEPEND}
+ test? (
+ ${COV_DEP}
+ $(python_gen_cond_dep '
+ dev-python/twisted[${PYTHON_USEDEP}]
+ ' python2_7 python3_{6,7,8})
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python-3.5-backport.patch
+
+ # Patch against master found in an upstream PR, backported:
+ # https://github.com/nose-devs/nose/pull/1004
+ "${FILESDIR}"/${P}-coverage-4.1-support.patch
+
+ "${FILESDIR}"/${P}-python-3.6-test.patch
+)
+
+python_prepare_all() {
+ # Tests need to be converted, and they don't respect BUILD_DIR.
+ use test && DISTUTILS_IN_SOURCE_BUILD=1
+
+ # Disable tests requiring network connection.
+ sed \
+ -e "s/test_resolve/_&/g" \
+ -e "s/test_raises_bad_return/_&/g" \
+ -e "s/test_raises_twisted_error/_&/g" \
+ -i unit_tests/test_twisted.py || die "sed failed"
+ # Disable versioning of nosetests script to avoid collision with
+ # versioning performed by the eclass.
+ sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \
+ -i setup.py || die "sed2 failed"
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ local add_targets=()
+
+ if use test; then
+ add_targets+=( egg_info )
+ python_is_python3 && add_targets+=( build_tests )
+ fi
+
+ distutils-r1_python_compile "${add_targets[@]}"
+}
+
+python_test() {
+ "${EPYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use examples && dodoc -r examples
+ distutils-r1_python_install_all
+}