summaryrefslogtreecommitdiff
path: root/app-shells/thefuck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-23 00:06:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-23 00:06:40 +0100
commitb3b92de25c3fc5f6bddc5e513027140591a0b2a5 (patch)
treef2ce6d7e747abea3e8fa7d99e32ad5d98cf33988 /app-shells/thefuck
parent236e75597883501f8700d9ba1a5c8276f578a17f (diff)
gentoo auto-resync : 23:05:2024 - 00:06:39
Diffstat (limited to 'app-shells/thefuck')
-rw-r--r--app-shells/thefuck/Manifest3
-rw-r--r--app-shells/thefuck/files/thefuck-3.32-python-312.patch45
-rw-r--r--app-shells/thefuck/thefuck-3.32-r2.ebuild (renamed from app-shells/thefuck/thefuck-3.32.ebuild)21
3 files changed, 65 insertions, 4 deletions
diff --git a/app-shells/thefuck/Manifest b/app-shells/thefuck/Manifest
index 3e8befe86e48..b21246db858d 100644
--- a/app-shells/thefuck/Manifest
+++ b/app-shells/thefuck/Manifest
@@ -1,4 +1,5 @@
+AUX thefuck-3.32-python-312.patch 1295 BLAKE2B 6d145af76bc32c28409baab02fb1752a8257577f92bb63a1768bbbc434030c899e2bcd19cfa618e07786b38c639b2b1abdc48fc04e29b66873e51bdf6104daae SHA512 6116d00ff864e929c37fcbf8dee645ffb952f4a364d6e8b25e1c6593f3e14e0be467ae70d7f0fac2ad8d4235f753241ec0036285b1f99b044deedc6f796da732
DIST thefuck-3.32.tar.gz 1234795 BLAKE2B f62aca1601b2cec4cc14dc63f6d7e7fffc8ab0e1cf88e44c3170ec6744998e97e97813e9dc6aaccc0a850b0a15f958483da24bcf1d176e43bad1b2272272e7a0 SHA512 961b9b6dc374cc0b854698455f688cf110adb21cfebd4cb645eb5f1ce11c14de6699bb4d40de86a5f9461273cbfc2eea318a9d437f803dc578dd431966cf26c1
EBUILD thefuck-3.32-r1.ebuild 1161 BLAKE2B 9b190c5abbbf52c2682b8ec9bd41e06806fe1284761640613a6430bb55cee1ee9c697462ea54eed3fc219001cefc21d29ac526928da5bd6bcd1fdd765d840a2d SHA512 c389ac15ad3887410709582a51f3737715e2b551d745d33a0864ad3db671585fa25dfc13c149e9cac8965bf67909815fda30f92360c8b7915c13fb34013dea0a
-EBUILD thefuck-3.32.ebuild 880 BLAKE2B 33d3844291aff718733891764bebe53b61a4fcf8b88676a4d8e2728aac6976746765668e94bb1243a89d8f0cf37eb8b11a04baa337bc555d783e725d9da88416 SHA512 a5ec9fe2764887c580e5d53a93ca2ca0e1f02102ac60e2bccdf0917db0111e9735332bc5ddcd88832138b84462c522d5db4e4dda68e0df2e41d28590480d9e99
+EBUILD thefuck-3.32-r2.ebuild 1348 BLAKE2B d21595bed625e6e60a5d4bd5383f13a4f96153b570fd080d3fb00b7bb20b1f3cc58736efa50611e919535d6f2dc40f5beff293e40b1138ef73b4436996da32b3 SHA512 105eb250a19f70364a1c9edda18106a1d116ae6e19a06c28e3d8e026976330ddb0709d40e62c9d090a80e1a31147b018b959df0a8c24f0595193194ff1e0dafc
MISC metadata.xml 269 BLAKE2B 19b3e31874e41daeee0fcc465075c0519eb2e56df2eb93a93b48e1041459802d3e0312fc7298ed25742f7058dd0e24982c1da267a1cf65fdd9fbaced7d206e9c SHA512 a5cc8b5aa63bca75b9e84676d513003707cbbfc2ce2c51a989896032e7cc134b3759056fc9d4262545c442307267edd801dad16c392d48aa7bfed2a894f14733
diff --git a/app-shells/thefuck/files/thefuck-3.32-python-312.patch b/app-shells/thefuck/files/thefuck-3.32-python-312.patch
new file mode 100644
index 000000000000..96554b046dcd
--- /dev/null
+++ b/app-shells/thefuck/files/thefuck-3.32-python-312.patch
@@ -0,0 +1,45 @@
+https://github.com/nvbn/thefuck/commit/0420442e778dd7bc53bdbdb50278eea2c207dc74
+From: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
+Date: Mon, 10 Jul 2023 14:43:45 +0200
+Subject: [PATCH] #1248: Use imp only when importlib.util not available
+
+The imp module is deprecated and will be removed in Python 12.
+
+--- a/thefuck/conf.py
++++ b/thefuck/conf.py
+@@ -1,4 +1,3 @@
+-from imp import load_source
+ import os
+ import sys
+ from warnings import warn
+@@ -6,6 +5,17 @@
+ from . import const
+ from .system import Path
+
++try:
++ import importlib.util
++
++ def load_source(name, pathname, _file=None):
++ module_spec = importlib.util.spec_from_file_location(name, pathname)
++ module = importlib.util.module_from_spec(module_spec)
++ module_spec.loader.exec_module(module)
++ return module
++except ImportError:
++ from imp import load_source
++
+
+ class Settings(dict):
+ def __getattr__(self, item):
+--- a/thefuck/types.py
++++ b/thefuck/types.py
+@@ -1,9 +1,8 @@
+-from imp import load_source
+ import os
+ import sys
+ from . import logs
+ from .shells import shell
+-from .conf import settings
++from .conf import settings, load_source
+ from .const import DEFAULT_PRIORITY, ALL_ENABLED
+ from .exceptions import EmptyCommand
+ from .utils import get_alias, format_raw_script
diff --git a/app-shells/thefuck/thefuck-3.32.ebuild b/app-shells/thefuck/thefuck-3.32-r2.ebuild
index 078c37a9f1aa..e0aaf60c480d 100644
--- a/app-shells/thefuck/thefuck-3.32.ebuild
+++ b/app-shells/thefuck/thefuck-3.32-r2.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9,10} )
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1
@@ -13,7 +14,7 @@ SRC_URI="https://github.com/nvbn/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm64 ~x86"
RDEPEND="
dev-python/psutil[${PYTHON_USEDEP}]
@@ -28,8 +29,22 @@ DEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${P}-python-312.patch
+)
+
distutils_enable_tests pytest
+EPYTEST_DESELECT=(
+ # failing tests because of trying to access portage's home dir
+ tests/test_conf.py
+ tests/entrypoints/test_not_configured.py
+ tests/test_utils.py::test_get_all_executables_exclude_paths
+ tests/test_utils.py::TestCache
+ # These tests fail with py312; #929026
+ tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current
+)
+
python_prepare_all() {
sed -i -e "/import pip/s/^/#/" -e "/pip.__version__/,+3 s/^/#/" setup.py || die
distutils-r1_python_prepare_all