mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/filebytes: fix py3.14 compat
For some reason,0a6d349869wasn't right, but it only fails for me on one machine w/ single target py3.14, not otherwise. I know Arthur tested it properly too givencf53d4052b, so no idea what happened there. My workstation works fine before the patch I'm adding now too... Anyway, backport the patch from upstream. Fixes:0a6d349869Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -22,6 +22,10 @@ fi
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.10.2-py314.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
"${EPYTHON}" - <<-EOF || die "Tests failed with ${EPYTHON}"
|
||||
from filebytes.elf import *
|
||||
|
||||
41
dev-python/filebytes/files/filebytes-0.10.2-py314.patch
Normal file
41
dev-python/filebytes/files/filebytes-0.10.2-py314.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
https://github.com/sashs/filebytes/commit/469058d50d4b7ff8da54b623a0a1aa972cd78dc6
|
||||
|
||||
From 469058d50d4b7ff8da54b623a0a1aa972cd78dc6 Mon Sep 17 00:00:00 2001
|
||||
From: Seva Alekseyev <sevaa@nih.gov>
|
||||
Date: Thu, 4 Dec 2025 11:24:19 -0500
|
||||
Subject: [PATCH] No more hand parsing __init__ for VERSION
|
||||
|
||||
---
|
||||
setup.py | 22 ++--------------------
|
||||
1 file changed, 2 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index d2d7cdb..5890e5a 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,22 +1,4 @@
|
||||
from setuptools import setup
|
||||
-import ast
|
||||
-import os
|
||||
-currentDir = os.path.dirname(os.path.abspath(__file__))
|
||||
-#currentDir = Path(__file__).parent
|
||||
+from filebytes.__init__ import VERSION
|
||||
|
||||
-def extractMetaInfo(src):
|
||||
- info = {}
|
||||
- a=ast.parse(src)
|
||||
- for e in a.body:
|
||||
- if isinstance(e, ast.Assign) and isinstance(e.value, ast.Str):
|
||||
- info[e.targets[0].id] = e.value.s
|
||||
- return info
|
||||
-
|
||||
-text = ''
|
||||
-with open(currentDir +os.path.sep+"filebytes"+ os.path.sep+"__init__.py") as f:
|
||||
- text = f.read()
|
||||
-
|
||||
-version = extractMetaInfo(text)["VERSION"]
|
||||
-
|
||||
-
|
||||
-setup(version=version)
|
||||
+setup(version=VERSION)
|
||||
|
||||
Reference in New Issue
Block a user