commit: 7ec7fd8d98a4b9ec3c9575bbcb902a79aa2522fb Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> AuthorDate: Fri Mar 9 23:06:40 2018 +0000 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> CommitDate: Fri Mar 9 23:42:56 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ec7fd8d
dev-python/yapsy: Python 3.6 Bug: https://bugs.gentoo.org/643732 Package-Manager: Portage-2.3.24, Repoman-2.3.6 .../files/yapsy-1.11.223-python36-tests.patch | 22 ++++++++++ dev-python/yapsy/yapsy-1.11.223-r2.ebuild | 47 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/dev-python/yapsy/files/yapsy-1.11.223-python36-tests.patch b/dev-python/yapsy/files/yapsy-1.11.223-python36-tests.patch new file mode 100644 index 00000000000..55b6b00873b --- /dev/null +++ b/dev-python/yapsy/files/yapsy-1.11.223-python36-tests.patch @@ -0,0 +1,22 @@ +From b79ab28e430995cd64923bb93474b214bc38529b Mon Sep 17 00:00:00 2001 +From: Thibauld Nion <[email protected]> +Date: Sun, 29 Jan 2017 18:31:06 +0100 +Subject: [PATCH] fix error on python 3.6 + +--- + test/test_ErrorInPlugin.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test_ErrorInPlugin.py b/test/test_ErrorInPlugin.py +index 171ce5d..9f22dcf 100644 +--- a/test/test_ErrorInPlugin.py ++++ b/test/test_ErrorInPlugin.py +@@ -50,7 +50,7 @@ def errorMock(*args,**kwargs): + self.assertEqual(len(callback_infos),1) + self.assertTrue(isinstance(callback_infos[0].error,tuple)) + self.assertEqual(loadedPlugins[0],callback_infos[0]) +- self.assertEqual(callback_infos[0].error[0],ImportError) ++ self.assertTrue(issubclass(callback_infos[0].error[0],ImportError)) + # check that the getCategories works + self.assertEqual(len(spm.getCategories()),1) + sole_category = spm.getCategories()[0] diff --git a/dev-python/yapsy/yapsy-1.11.223-r2.ebuild b/dev-python/yapsy/yapsy-1.11.223-r2.ebuild new file mode 100644 index 00000000000..62cd725684e --- /dev/null +++ b/dev-python/yapsy/yapsy-1.11.223-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +MY_P="Yapsy-${PV}" +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 + +DESCRIPTION="A fat-free DIY Python plugin management toolkit" +HOMEPAGE="http://yapsy.sourceforge.net/" +SRC_URI="mirror://sourceforge/yapsy/${MY_P}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${P}-python36-tests.patch +) + +python_prepare_all() { + # Disable erroneous test + sed -e 's:test_default_plugins_place_is_parent_dir:_&:' \ + -i test/test_PluginFileLocator.py || die + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C doc html +} + +python_test() { + esetup.py test +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/_build/html/. ) + distutils-r1_python_install_all +}
