Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/autojump/, app-shells/autojump/files/
Date: Thu, 27 Jan 2022 20:56:14
Message-Id: 1643316964.6dedaa5efa9849ff40627490e39f01ca9a89298c.mattst88@gentoo
1 commit: 6dedaa5efa9849ff40627490e39f01ca9a89298c
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 27 20:16:37 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 27 20:56:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dedaa5e
7
8 app-shells/autojump: Use mock from unittest
9
10 Closes: https://bugs.gentoo.org/831958
11 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
12
13 app-shells/autojump/autojump-22.5.3-r1.ebuild | 6 ++++-
14 .../files/22.5.3-Use-mock-from-unittest.patch | 27 ++++++++++++++++++++++
15 2 files changed, 32 insertions(+), 1 deletion(-)
16
17 diff --git a/app-shells/autojump/autojump-22.5.3-r1.ebuild b/app-shells/autojump/autojump-22.5.3-r1.ebuild
18 index 6786cfcf9684..6c1430f5a0b7 100644
19 --- a/app-shells/autojump/autojump-22.5.3-r1.ebuild
20 +++ b/app-shells/autojump/autojump-22.5.3-r1.ebuild
21 @@ -29,8 +29,12 @@ DEPEND="${PYTHON_DEPS}
22
23 distutils_enable_tests pytest
24
25 +PATCHES=(
26 + "${FILESDIR}"/${PV}-Use-mock-from-unittest.patch
27 +)
28 +
29 src_prepare() {
30 - eapply_user
31 + default
32 sed -e "s:/usr/local/share:/usr/share:" \
33 -i bin/autojump.sh || die
34
35
36 diff --git a/app-shells/autojump/files/22.5.3-Use-mock-from-unittest.patch b/app-shells/autojump/files/22.5.3-Use-mock-from-unittest.patch
37 new file mode 100644
38 index 000000000000..942d19c838e0
39 --- /dev/null
40 +++ b/app-shells/autojump/files/22.5.3-Use-mock-from-unittest.patch
41 @@ -0,0 +1,27 @@
42 +https://github.com/wting/autojump/pull/648
43 +
44 +From b935baa9ab73305e0c8e3d733f40cc8567740020 Mon Sep 17 00:00:00 2001
45 +From: Matt Turner <mattst88@×××××.com>
46 +Date: Thu, 27 Jan 2022 12:11:33 -0800
47 +Subject: [PATCH] Use mock from unittest
48 +
49 +---
50 + tests/unit/autojump_utils_test.py | 2 +-
51 + 1 file changed, 1 insertion(+), 1 deletion(-)
52 +
53 +diff --git a/tests/unit/autojump_utils_test.py b/tests/unit/autojump_utils_test.py
54 +index 07f67b3..386b4cd 100644
55 +--- a/tests/unit/autojump_utils_test.py
56 ++++ b/tests/unit/autojump_utils_test.py
57 +@@ -3,7 +3,7 @@
58 + import os
59 + import sys
60 +
61 +-import mock
62 ++from unittest import mock
63 + import pytest
64 +
65 + sys.path.append(os.path.join(os.getcwd(), 'bin')) # noqa
66 +--
67 +2.34.1
68 +