From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/nose/Manifest | 10 +++ .../files/nose-1.3.7-coverage-4.1-support.patch | 20 +++++ .../files/nose-1.3.7-python-3.5-backport.patch | 54 ++++++++++++ .../nose/files/nose-1.3.7-python-3.6-test.patch | 67 +++++++++++++++ dev-python/nose/metadata.xml | 13 +++ dev-python/nose/nose-1.3.7-r1.ebuild | 87 +++++++++++++++++++ dev-python/nose/nose-1.3.7-r3.ebuild | 97 ++++++++++++++++++++++ dev-python/nose/nose-9999.ebuild | 86 +++++++++++++++++++ 8 files changed, 434 insertions(+) create mode 100644 dev-python/nose/Manifest create mode 100644 dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch create mode 100644 dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch create mode 100644 dev-python/nose/files/nose-1.3.7-python-3.6-test.patch create mode 100644 dev-python/nose/metadata.xml create mode 100644 dev-python/nose/nose-1.3.7-r1.ebuild create mode 100644 dev-python/nose/nose-1.3.7-r3.ebuild create mode 100644 dev-python/nose/nose-9999.ebuild (limited to 'dev-python/nose') diff --git a/dev-python/nose/Manifest b/dev-python/nose/Manifest new file mode 100644 index 000000000000..1ba9a6a091f0 --- /dev/null +++ b/dev-python/nose/Manifest @@ -0,0 +1,10 @@ +AUX nose-1.3.7-coverage-4.1-support.patch 950 SHA256 cb035a62795d7153ab1d58580e296cf3b4a6b7329141d327b70d47c75ecb5485 SHA512 2d1512ca1f0572e4ffb17ac4b964e391ed9c5b5bdb78eac7a1710d51804f8c33c6ffbeb9b85565dc2d4162c5a912c864f15c7857e85cb294c1e0712ae540e983 WHIRLPOOL 6ad1406603a6313cd9e1129245ec525befca44cae69649da4717f5b3fb05f3dd0f6ad0c0a656cef9030c2e14a9274ceb86d43d17076d275c9573f988da83416e +AUX nose-1.3.7-python-3.5-backport.patch 1802 SHA256 27ad021497110ca7714d76d3d33078ee873e9f1e381d350cc57f30a1ebca66c1 SHA512 032c4c291edd76bb594329578e57483942ced2a46c3f6cd4e914d905f3894e420cc4da0ba2a63c266c81dd4d8f40b8df180f56ac75cb3c5e83e0309bbac573b2 WHIRLPOOL c39301a51286d54a376d928a0c3bad9d1d7be9aaf7662739f8865784d659f9d3b31a8c6321c6ba5268e6eba6d0f5ef3839622885818a08595ed3c43addebf246 +AUX nose-1.3.7-python-3.6-test.patch 3289 SHA256 a7dd82d60092a7880175ca1f79db0d2a980d595093e81457e55219b784fe891e SHA512 0be6e49f08a4098b4c5dd1d9678e757c8f1f317fb13bd355a035c44bcdd9cd043be1755bb97c4ca78397985f07f6fc486ddd10cb56dd8d8774d631eebcc81127 WHIRLPOOL 3d3d3665b27b36b389a350ab67be4437b1914cb8c377f7203fe624a821c288eb85afdd678e6d413093aa7905f5d04e9af82daac9262aba63cfd1527ece2aeefd +DIST nose-1.3.7.tar.gz 280488 SHA256 f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98 SHA512 e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62 WHIRLPOOL 68684b12e18d41b1f49ba3e832adf8a03b3b84ce530f0bde34f8c40c84f38046aac2777090472fefe87ba7abe3fdffa4cdcad74e3b717fcb9dfe932a0657b965 +EBUILD nose-1.3.7-r1.ebuild 2473 SHA256 eee7fe1267d995d4c1259974155c2f250a2e454717a7a0e676e6067581567574 SHA512 a3c1896c7d8d32ba892e0c298df3a034e75ea4139eeb8128dcf971ed8af0378a9630e6dd4991079e8f8a5b7a4362177d32432534bf89385c92689b6aa0a61c38 WHIRLPOOL 14136edec51e50872def78a2e02644fefbda904392715b1e6dc191a1240f821e45cd40c54d89788347fe03508d1c15026fd43724b570ed8546820296f796dcf8 +EBUILD nose-1.3.7-r3.ebuild 2787 SHA256 3e6caaf4e46fb2cae5cd0fcf8d7b4a5d3a1c7c00cd4b772d1d5f16ef1bfce2dc SHA512 de7830662cd825cb9f629c71afad9334a79be1c9d67d8b6f3b5f2a93726f9f596b70b8ee85941c5e26d7a750b60c2ab63997d7f9a86694b8f3b7b91cefddd953 WHIRLPOOL 4ac9a8c469d4190249d81d42c8b2bdd17cbd4d00a74ae5474168b2bdcc3aa51493e9daab52cb567a6b4b1f6715d6a89b8ea82c512dce315091c7b57d79302398 +EBUILD nose-9999.ebuild 2237 SHA256 aee52e64b3ba1ee42162b7c4840cebd5b9ea1363ef8ca3cf8444c10afcb58db6 SHA512 fa26978883453067a1452c62927f96606d7efb71c9934bcab8f835f437c32436610efaccf268d8dd87c169e3ec47d000b5a318dbabf77f5b34e93f5fecfa4df6 WHIRLPOOL 94096a9aa966fa1ed824fb2bd0d203349a03c547c308c062ebb229239558c3f328ad1e4710639b4552b7038ef7bef01d360c4839bc164ae040ab4cd1a87aed1d +MISC ChangeLog 9422 SHA256 f9451454433788e8be79ee99313b36698cef3954bb5f26af503e4cf921cc7fdf SHA512 a6a7e317cf54d134811ecc3cd3431c5a5880f8a3678489f51931d4eda8393e6de66d5b79d328c76e52eb5d68fa09e482e6996a139704a39cd447da99e79662b5 WHIRLPOOL 9ac5675a7d89537f153d8866b55524c2af9e568160c9ac110aaea25cef950161d1b50c9589e6ab47b9855c2f778d2985b79a1d3ad7d429b2eb46c661db410702 +MISC ChangeLog-2015 19074 SHA256 ffca2b5bc4edd1625d2b044124806144bd435bea8b7fd11f0f9e24b997ad8331 SHA512 31c15a6f30578d706c6bda286a475d2b401fee7bddbcebbef98daf095ffe877a83df10b32df0c0c9c15bc8535db77ab76e8e3a7b14ec08db9fe92dd121ce532e WHIRLPOOL 777c324dd9689252f366cc50e0edd0a6072ac3057f39f3bcda2234114e4eb6f8905673549921c2abe9a2ff483d7bfe29978c47a2df2ff96620dd2200b71dcd5c +MISC metadata.xml 432 SHA256 53e82e318d1263b44bf3470627bd8a7c806023dbb71e777098327cc523dffc1c SHA512 d4ff137034358979e2b59fa11e18ff17ade90c1c2127f5c769a58c8867a5de1a4736c2d22cad063b9119067578feb6401305f6acfd3e05d897b3f01f273e5530 WHIRLPOOL 710662c65d421dbfe7def2e85d3099ff023af5a96417c78f105d166dc0ddeeb7b005aa0d1ed4fb234a32c38d257723a79290d23278886759b41744fbd7e2fdc7 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 +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 +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 + + ====================================================================== +- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...) ++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...) + ---------------------------------------------------------------------- + Traceback (most recent call last): + ... +- ImportError: No module ...apackagethatdoesntexist... ++ ...: No module ...apackagethatdoesntexist... + + ====================================================================== + 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 + + ====================================================================== +- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...) ++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...) + ---------------------------------------------------------------------- + Traceback (most recent call last): + ... +- ImportError: No module ...apackagethatdoesntexist... ++ ...: No module ...apackagethatdoesntexist... + + ---------------------------------------------------------------------- + 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..1b59d602e352 --- /dev/null +++ b/dev-python/nose/metadata.xml @@ -0,0 +1,13 @@ + + + + + python@gentoo.org + Python + + + nose + nose-devs/nose + jpellerin/nose + + diff --git a/dev-python/nose/nose-1.3.7-r1.ebuild b/dev-python/nose/nose-1.3.7-r1.ebuild new file mode 100644 index 000000000000..04357fb0e9ce --- /dev/null +++ b/dev-python/nose/nose-1.3.7-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring" +HOMEPAGE=" + https://pypi.python.org/pypi/nose + https://nose.readthedocs.io/en/latest/ + https://bitbucket.org/jpellerin/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 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples test" + +REQUIRED_USE=" + doc? ( || ( $(python_gen_useflags 'python2*') ) )" + +RDEPEND=" + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] ) + test? ( $(python_gen_cond_dep 'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) )" + +PATCHES=( "${FILESDIR}"/${P}-python-3.5-backport.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() { + "${PYTHON}" 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-r3.ebuild b/dev-python/nose/nose-1.3.7-r3.ebuild new file mode 100644 index 000000000000..e97460f08d2e --- /dev/null +++ b/dev-python/nose/nose-1.3.7-r3.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring" +HOMEPAGE=" + https://pypi.python.org/pypi/nose + https://nose.readthedocs.io/en/latest/ + https://bitbucket.org/jpellerin/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 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples test" + +REQUIRED_USE=" + doc? ( || ( $(python_gen_useflags 'python2*') ) )" + +RDEPEND=" + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] ) + test? ( || ( $(python_gen_cond_dep 'dev-python/twisted[${PYTHON_USEDEP}]' python2_7 python3_{4,5,6}) + $(python_gen_cond_dep 'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) + ) )" + +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() { + "${PYTHON}" 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-9999.ebuild b/dev-python/nose/nose-9999.ebuild new file mode 100644 index 000000000000..3c9d5bb2829d --- /dev/null +++ b/dev-python/nose/nose-9999.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 git-r3 + +DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring" +HOMEPAGE=" + https://pypi.python.org/pypi/nose + https://nose.readthedocs.io/en/latest/ + https://github.com/nose-devs/nose" +SRC_URI="" +EGIT_REPO_URI="https://github.com/nose-devs/${PN}.git" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="" +IUSE="doc examples test" + +REQUIRED_USE=" + doc? ( || ( $(python_gen_useflags 'python2*') ) )" + +RDEPEND=" + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] ) + test? ( $(python_gen_cond_dep 'dev-python/twisted[${PYTHON_USEDEP}]' python2_7 python3_{4,5,6}) )" + +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() { + "${PYTHON}" 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 +} -- cgit v1.2.3