mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-08 00:05:33 +03:00
dev-python/beniget: Bump to 0.5.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
8316557632
commit
59c1c5726d
@ -1 +1,2 @@
|
||||
DIST beniget-0.4.2.post1.tar.gz 32274 BLAKE2B 808b9cec64dd8cd62418c557092a58c228e91e6ee7dd9fea40af23081a77ddb5b7db01ca025d692e38a9a71181d4a23523170b29d89c318c75f228aaa219bea2 SHA512 7270d36e2ae98bd984b7f7e90f43c0dbf7b06601370ae71064a8b0a1babe4ca91e78ec8564a6836221c9a331835834e97670f5c7c0f4d40ff22835338b1ef3db
|
||||
DIST beniget-0.5.0.tar.gz 37097 BLAKE2B 07e55337ac01613c17a251a5947e49ce406c6b1ac3e5e65bf02f520b748f371631a164b51e1147ae1cb67f2ad1ea6d23f77172963246f420d77a2165c31d6cae SHA512 7094e5c0759d54738aa10923e96e3b20a50dc7736311e36fda757d16eb47838eae8372da53fb794a6871d0f92a38726889665b78b364a430e253b44de795cb6e
|
||||
|
||||
30
dev-python/beniget/beniget-0.5.0.ebuild
Normal file
30
dev-python/beniget/beniget-0.5.0.ebuild
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2021-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Extract semantic information about static Python code"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/beniget/
|
||||
https://github.com/serge-sans-paille/beniget/
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/gast-0.7.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests unittest
|
||||
|
||||
PATCHES=(
|
||||
# https://github.com/serge-sans-paille/beniget/commit/8234baaaa433a8d23445be1ac48e20f63e96d0e8
|
||||
"${FILESDIR}/${P}-pypy311.patch"
|
||||
)
|
||||
46
dev-python/beniget/files/beniget-0.5.0-pypy311.patch
Normal file
46
dev-python/beniget/files/beniget-0.5.0-pypy311.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 8234baaaa433a8d23445be1ac48e20f63e96d0e8 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sergesanspaille@free.fr>
|
||||
Date: Sun, 30 Nov 2025 19:52:42 +0100
|
||||
Subject: [PATCH] Improve test portability with PyPy
|
||||
|
||||
Fix #150
|
||||
---
|
||||
tests/test_chains.py | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_chains.py b/tests/test_chains.py
|
||||
index 1be68dd..d26e312 100644
|
||||
--- a/tests/test_chains.py
|
||||
+++ b/tests/test_chains.py
|
||||
@@ -35,6 +35,12 @@ def captured_output():
|
||||
finally:
|
||||
sys.stdout, sys.stderr = old_out, old_err
|
||||
|
||||
+if sys.implementation.name == 'pypy':
|
||||
+ def normalize_chain(chain):
|
||||
+ return chain.replace('<builtin_function>', '<builtin_function_or_method>')
|
||||
+else:
|
||||
+ def normalize_chain(chain):
|
||||
+ return chain
|
||||
|
||||
class StrictDefUseChains(beniget.DefUseChains):
|
||||
def warn(self, msg, node):
|
||||
@@ -54,7 +60,8 @@ def checkChains(self, code, ref, strict=True):
|
||||
c = beniget.DefUseChains()
|
||||
|
||||
c.visit(node)
|
||||
- self.assertEqual(c.dump_chains(node), ref)
|
||||
+ out = list(map(normalize_chain, c.dump_chains(node)))
|
||||
+ self.assertEqual(ref, out)
|
||||
return node, c
|
||||
|
||||
def test_simple_expression(self):
|
||||
@@ -1669,6 +1676,8 @@ def checkChains(self, code, ref):
|
||||
# 3.6 or 3.7
|
||||
actual = replace_deprecated_names(actual)
|
||||
|
||||
+ actual = normalize_chain(actual)
|
||||
+
|
||||
self.assertEqual(actual, ref)
|
||||
|
||||
def test_simple_expression(self):
|
||||
Loading…
x
Reference in New Issue
Block a user