[gentoo-commits] repo/gentoo:master commit in: app-shells/autojump/, app-shells/autojump/files/

2022-01-27 Thread Matt Turner
commit: 6dedaa5efa9849ff40627490e39f01ca9a89298c
Author: Matt Turner  gentoo  org>
AuthorDate: Thu Jan 27 20:16:37 2022 +
Commit: Matt Turner  gentoo  org>
CommitDate: Thu Jan 27 20:56:04 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dedaa5e

app-shells/autojump: Use mock from unittest

Closes: https://bugs.gentoo.org/831958
Signed-off-by: Matt Turner  gentoo.org>

 app-shells/autojump/autojump-22.5.3-r1.ebuild  |  6 -
 .../files/22.5.3-Use-mock-from-unittest.patch  | 27 ++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/app-shells/autojump/autojump-22.5.3-r1.ebuild 
b/app-shells/autojump/autojump-22.5.3-r1.ebuild
index 6786cfcf9684..6c1430f5a0b7 100644
--- a/app-shells/autojump/autojump-22.5.3-r1.ebuild
+++ b/app-shells/autojump/autojump-22.5.3-r1.ebuild
@@ -29,8 +29,12 @@ DEPEND="${PYTHON_DEPS}
 
 distutils_enable_tests pytest
 
+PATCHES=(
+   "${FILESDIR}"/${PV}-Use-mock-from-unittest.patch
+)
+
 src_prepare() {
-   eapply_user
+   default
sed -e "s:/usr/local/share:/usr/share:" \
-i bin/autojump.sh || die
 

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
new file mode 100644
index ..942d19c838e0
--- /dev/null
+++ b/app-shells/autojump/files/22.5.3-Use-mock-from-unittest.patch
@@ -0,0 +1,27 @@
+https://github.com/wting/autojump/pull/648
+
+From b935baa9ab73305e0c8e3d733f40cc8567740020 Mon Sep 17 00:00:00 2001
+From: Matt Turner 
+Date: Thu, 27 Jan 2022 12:11:33 -0800
+Subject: [PATCH] Use mock from unittest
+
+---
+ tests/unit/autojump_utils_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/autojump_utils_test.py 
b/tests/unit/autojump_utils_test.py
+index 07f67b3..386b4cd 100644
+--- a/tests/unit/autojump_utils_test.py
 b/tests/unit/autojump_utils_test.py
+@@ -3,7 +3,7 @@
+ import os
+ import sys
+ 
+-import mock
++from unittest import mock
+ import pytest
+ 
+ sys.path.append(os.path.join(os.getcwd(), 'bin'))  # noqa
+-- 
+2.34.1
+



[gentoo-commits] repo/gentoo:master commit in: app-shells/autojump/, app-shells/autojump/files/

2016-02-17 Thread Patrice Clement
commit: c9c68d5695775a3967d1ef0a3586b2eeb7076afc
Author: Patrice Clement  gentoo  org>
AuthorDate: Wed Feb 17 10:31:00 2016 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Wed Feb 17 10:35:44 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9c68d56

app-shells/autojump: Stable for amd64+x86.

Package-Manager: portage-2.2.26

 app-shells/autojump/autojump-22.2.4-r4.ebuild| 16 ++--
 ...o.patch => autojump-22.2.4-fix-__aj_error-typo.patch} |  0
 ...atch => autojump-22.2.4-fix-autojump.fish-bugs.patch} |  0
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/app-shells/autojump/autojump-22.2.4-r4.ebuild 
b/app-shells/autojump/autojump-22.2.4-r4.ebuild
index 84bf291..8ba85aa 100644
--- a/app-shells/autojump/autojump-22.2.4-r4.ebuild
+++ b/app-shells/autojump/autojump-22.2.4-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -14,7 +14,7 @@ 
SRC_URI="https://github.com/joelthelion/${PN}/archive/release-v${PV}.tar.gz -> $
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="~amd64 ~x86 ~ppc ~ppc64"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
 IUSE="ipython test"
 
 # Not all tests pass. Need investigation.
@@ -22,6 +22,11 @@ RESTRICT="test"
 RDEPEND="ipython? ( ${PYTHON_DEPS} )"
 DEPEND="test? ( dev-python/flake8 dev-python/tox )"
 
+PATCHES=(
+   "${FILESDIR}/${P}-fix-autojump.fish-bugs.patch"
+   "${FILESDIR}/${P}-fix-__aj_error-typo.patch"
+)
+
 src_prepare() {
sed -e "s: \(/etc/profile.d\): \"${EPREFIX}\1\":" \
-e "s:/usr/local/share:/usr/share:" \
@@ -33,8 +38,7 @@ src_prepare() {
 
# upstream fixes to the autojump.fish script; the first patch is needed 
for
# the second patch to apply
-   epatch "${FILESDIR}/autojump-22.4.4-fix-autojump.fish-bugs.patch"
-   epatch "${FILESDIR}/autojump-22.4.4-fix-__aj_error-typo.patch"
+   epatch "${PATCHES[@]}"
 }
 
 src_compile() {
@@ -42,8 +46,8 @@ src_compile() {
 }
 
 src_install() {
-   dobin bin/autojump
-   python_replicate_script "${ED}"/usr/bin/autojump
+   dobin bin/"${PN}"
+   python_replicate_script "${ED}"/usr/bin/"${PN}"
 
insinto /etc/profile.d
doins bin/"${PN}".sh

diff --git 
a/app-shells/autojump/files/autojump-22.4.4-fix-__aj_error-typo.patch 
b/app-shells/autojump/files/autojump-22.2.4-fix-__aj_error-typo.patch
similarity index 100%
rename from app-shells/autojump/files/autojump-22.4.4-fix-__aj_error-typo.patch
rename to app-shells/autojump/files/autojump-22.2.4-fix-__aj_error-typo.patch

diff --git 
a/app-shells/autojump/files/autojump-22.4.4-fix-autojump.fish-bugs.patch 
b/app-shells/autojump/files/autojump-22.2.4-fix-autojump.fish-bugs.patch
similarity index 100%
rename from 
app-shells/autojump/files/autojump-22.4.4-fix-autojump.fish-bugs.patch
rename to app-shells/autojump/files/autojump-22.2.4-fix-autojump.fish-bugs.patch