From c7c44e7d68910acacef6d3c2efdfca980c44098c Mon Sep 17 00:00:00 2001 From: Gerion Entrup Date: Sat, 13 Jul 2019 00:02:45 +0200 Subject: [PATCH] dev-python/python-musicbrainz-ngs: python3.7 and fix test cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/689178 Closes: https://bugs.gentoo.org/653426 Package-Manager: Portage-2.3.66, Repoman-2.3.11 Signed-off-by: Gerion Entrup Closes: https://github.com/gentoo/gentoo/pull/12436 Signed-off-by: Michał Górny --- .../files/0.6-fix-test-submit.patch | 32 +++++++++++++++++++ .../python-musicbrainz-ngs-0.6.ebuild | 8 +++-- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch diff --git a/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch b/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch new file mode 100644 index 000000000000..4881936c80b1 --- /dev/null +++ b/dev-python/python-musicbrainz-ngs/files/0.6-fix-test-submit.patch @@ -0,0 +1,32 @@ +diff --git a/test/test_submit.py b/test/test_submit.py +index bce5362..2d13811 100644 +--- a/test/test_submit.py ++++ b/test/test_submit.py +@@ -1,13 +1,23 @@ + import unittest +-import os +-import sys +-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) +- + import musicbrainzngs + from musicbrainzngs import musicbrainz + from test import _common + ++ + class SubmitTest(unittest.TestCase): ++ ++ def setUp(self): ++ self.orig_opener = musicbrainzngs.compat.build_opener ++ musicbrainz.set_useragent("test_client", "1.0") ++ musicbrainz.auth("user", "password") ++ ++ def tearDown(self): ++ musicbrainzngs.compat.build_opener = self.orig_opener ++ musicbrainz._useragent = "" ++ musicbrainz._client = "" ++ musicbrainz.user = "" ++ musicbrainz.password = "" ++ + def test_submit_tags(self): + self.opener = _common.FakeOpener("") + musicbrainzngs.compat.build_opener = lambda *args: self.opener diff --git a/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild b/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild index 6dbb0b8902d6..4c2de26e4996 100644 --- a/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild +++ b/dev-python/python-musicbrainz-ngs/python-musicbrainz-ngs-0.6.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -PYTHON_COMPAT=( python{2_7,3_5,3_6} ) +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) inherit distutils-r1 @@ -20,6 +20,8 @@ IUSE="doc examples test" S="${WORKDIR}/${MY_PN}-${PV}" +PATCHES="${FILESDIR}/0.6-fix-test-submit.patch" + DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}] doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" -- 2.26.2