mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-python/rencode: Support >=dev-python/cython-3.1.0_rc1
Closes: https://bugs.gentoo.org/955434 Signed-off-by: Sebastian Pipping <sping@gentoo.org>
This commit is contained in:
26
dev-python/rencode/files/rencode-1.0.6-cython-3.1.0.patch
Normal file
26
dev-python/rencode/files/rencode-1.0.6-cython-3.1.0.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From db3ad169c16e00e39ebc72dc2938828f24299d56 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Sun, 11 May 2025 22:17:27 +0200
|
||||
Subject: [PATCH] rencode/rencode.pyx: Fix compilation for Cython 3.1.0
|
||||
|
||||
https://github.com/aresch/rencode/issues/31
|
||||
---
|
||||
rencode/rencode.pyx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rencode/rencode.pyx b/rencode/rencode.pyx
|
||||
index 3db1180..494919b 100644
|
||||
--- a/rencode/rencode.pyx
|
||||
+++ b/rencode/rencode.pyx
|
||||
@@ -275,7 +275,7 @@ cdef object MIN_SIGNED_LONGLONG = -MAX_SIGNED_LONGLONG
|
||||
|
||||
cdef encode(char **buf, unsigned int *pos, data):
|
||||
t = type(data)
|
||||
- if t == int or t == long:
|
||||
+ if t == int:
|
||||
if -128 <= data < 128:
|
||||
encode_char(buf, pos, data)
|
||||
elif -32768 <= data < 32768:
|
||||
--
|
||||
2.49.0
|
||||
|
||||
44
dev-python/rencode/rencode-1.0.6-r4.ebuild
Normal file
44
dev-python/rencode/rencode-1.0.6-r4.ebuild
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="similar to bencode from the BitTorrent project"
|
||||
HOMEPAGE="
|
||||
https://github.com/aresch/rencode/
|
||||
https://pypi.org/project/rencode/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/aresch/${PN}/archive/v${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
# https://github.com/aresch/rencode/commit/16e61e1ff4294bddb7c881536d3d454355c78969
|
||||
"${FILESDIR}/${P}-drop-wheel-dependency.patch"
|
||||
# bug #812437
|
||||
"${FILESDIR}/${P}-fix-CVE-2021-40839.patch"
|
||||
# bug #955434
|
||||
"${FILESDIR}"/${P}-cython-3.1.0.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
rm -rf rencode || die
|
||||
epytest
|
||||
}
|
||||
Reference in New Issue
Block a user