mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-05 14:07:27 -08:00
dev-ada/e3-core: fix obsolete pkg_resource
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
parent
32459088e8
commit
0f177d609e
@ -41,6 +41,7 @@ BDEPEND="test? (
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-22.1.0-test.patch
|
||||
"${FILESDIR}"/${P}-pkg_resource.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
32
dev-ada/e3-core/files/e3-core-22.6.0-pkg_resource.patch
Normal file
32
dev-ada/e3-core/files/e3-core-22.6.0-pkg_resource.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 49124d74da99b7678e60b2b326a6c1d1f1fc391b Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Ramonat <ramonat@adacore.com>
|
||||
Date: Wed, 11 Dec 2024 10:16:19 +0100
|
||||
Subject: [PATCH] Replace pkg_resources by importlib.resources
|
||||
|
||||
pkg_resources is deprecated
|
||||
|
||||
for it/e3-core#31
|
||||
---
|
||||
src/e3/os/process.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/e3/os/process.py b/src/e3/os/process.py
|
||||
index 98675f39..63523149 100644
|
||||
--- a/src/e3/os/process.py
|
||||
+++ b/src/e3/os/process.py
|
||||
@@ -83,9 +83,13 @@ def get_rlimit(platform: str | None = None) -> str:
|
||||
if platform == "x86_64-windows64":
|
||||
platform = "x86_64-windows"
|
||||
|
||||
- from pkg_resources import resource_filename
|
||||
+ import importlib.resources
|
||||
|
||||
- return resource_filename(__name__, os.path.join("data", f"rlimit-{platform}"))
|
||||
+ return str(
|
||||
+ importlib.resources.files("e3.os").joinpath(
|
||||
+ os.path.join("data", f"rlimit-{platform}")
|
||||
+ )
|
||||
+ )
|
||||
|
||||
|
||||
def quote_arg(arg: str) -> str:
|
||||
Loading…
x
Reference in New Issue
Block a user