summaryrefslogtreecommitdiff
path: root/dev-python/thriftpy2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-29 10:04:55 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-29 10:04:55 +0100
commit20325cfc3bd40d48d3c7034afaac4f5193d9c704 (patch)
treeb8e6ff7fc02271595e20f956b32cef56c41dafca /dev-python/thriftpy2
parent14a6858a7d8bc085420a1430b3a3f67885019f27 (diff)
gentoo auto-resync : 29:08:2023 - 10:04:54
Diffstat (limited to 'dev-python/thriftpy2')
-rw-r--r--dev-python/thriftpy2/Manifest2
-rw-r--r--dev-python/thriftpy2/files/thriftpy2-0.4.16-cython3.patch25
-rw-r--r--dev-python/thriftpy2/thriftpy2-0.4.16-r1.ebuild52
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/thriftpy2/Manifest b/dev-python/thriftpy2/Manifest
index 242b2e832db8..d6fadc078633 100644
--- a/dev-python/thriftpy2/Manifest
+++ b/dev-python/thriftpy2/Manifest
@@ -1,3 +1,5 @@
+AUX thriftpy2-0.4.16-cython3.patch 877 BLAKE2B a7bba9f41318a41112cbdbe71a8fb27c3c56d03285d82eec495f0517da11e93e009d43ab1998f5fa3ab50d8e10a0a152d7caba2c4b0d415dbc1b8775622f7e89 SHA512 5bb012fa9b5f6d517cb05f30692bf2a2188cbde7af51618c3aff4663b5717cd65a7ec8cd1a39fe3d8317688265b473a6719a2f7cddddb43f2f0bd970d2a86505
DIST thriftpy2-0.4.16.gh.tar.gz 146991 BLAKE2B 7547ea85106d0929d3e6ee771ff10ad2cd047f4e779c668e4a30ee936ac04d470e16d8321a2771db4404f57e1be41438b4a302bc04b8e4698db03de35dbfa5e9 SHA512 c00b21eb7db3fe91843a5129d16e7af2a29331489e7d8394bcf78eb5c4b8054162b9c5a024eec8080708dbffc491db7922258ecd895477cda49dcc7d56297ecf
+EBUILD thriftpy2-0.4.16-r1.ebuild 1024 BLAKE2B 82a5acee40fc38efc8f514ee8451686d617eabfd52360f15db9752d347ddf0f85ba729df2eea670390096889fdd8e6f5fb578018eee1fa997f1d81e2bec0c787 SHA512 1b3b80e887189bbf86145576c90cc34ad0a649087154c04d5196aae793c30ebf5b164241cb256b1c0bfd52c8404475f036acd619dc402d281bc515349305111b
EBUILD thriftpy2-0.4.16.ebuild 1024 BLAKE2B 1a318ee9c1e2dbfa6021c6daf1661c1582010ea2dc71bcb75cf09ccacd1c2642b979a7a77ec8fb42c2a30854775f55b5423f9caf68388ac30c73c641617215c4 SHA512 21bf48b8f9ab885323f1c56b8a083fdf8341f1c0e5cd07fc632481663002a4f48bdfe1dce3429d796a59bd14807d670e82505c0c2f138fcbbf6f2921c4c375f3
MISC metadata.xml 380 BLAKE2B 570746c7985eab098e590e49d267c406ce02cbf612dda6bf2a60439aee62cbf6eefebac14af29bf5fa52c8b5fd4846b2872beb7034364abb722f706978b55987 SHA512 d20d8641eea699cfa6d1930b8c5a9a8edfe76b5ef837551c52105d2fe8d70d481862c5d5cdbe389971588b3bdf62e9fb7e1cec2e89d635650cbabed7f7f53070
diff --git a/dev-python/thriftpy2/files/thriftpy2-0.4.16-cython3.patch b/dev-python/thriftpy2/files/thriftpy2-0.4.16-cython3.patch
new file mode 100644
index 000000000000..8e186d719d1e
--- /dev/null
+++ b/dev-python/thriftpy2/files/thriftpy2-0.4.16-cython3.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/898722
+https://github.com/Thriftpy/thriftpy2/commit/202ed5ef7b91399b86f8b3b76108a14612b38dbc
+
+From 202ed5ef7b91399b86f8b3b76108a14612b38dbc Mon Sep 17 00:00:00 2001
+From: AN Long <aisk1988@gmail.com>
+Date: Mon, 7 Aug 2023 17:11:51 +0800
+Subject: [PATCH] fix: compatible with cython3
+
+---
+ thriftpy2/transport/cybase.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/thriftpy2/transport/cybase.pyx b/thriftpy2/transport/cybase.pyx
+index c05560f8..d0fc3696 100644
+--- a/thriftpy2/transport/cybase.pyx
++++ b/thriftpy2/transport/cybase.pyx
+@@ -87,7 +87,7 @@ cdef class TCyBuffer(object):
+ if min_size <= self.buf_size:
+ return 0
+
+- cdef int multiples = min_size / self.buf_size
++ cdef int multiples = min_size // self.buf_size
+ if min_size % self.buf_size != 0:
+ multiples += 1
+
diff --git a/dev-python/thriftpy2/thriftpy2-0.4.16-r1.ebuild b/dev-python/thriftpy2/thriftpy2-0.4.16-r1.ebuild
new file mode 100644
index 000000000000..c7e8bd364392
--- /dev/null
+++ b/dev-python/thriftpy2/thriftpy2-0.4.16-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2021-2023 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..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Pure python approach of Apache Thrift"
+HOMEPAGE="
+ https://github.com/Thriftpy/thriftpy2/
+ https://pypi.org/project/thriftpy2/
+"
+SRC_URI="
+ https://github.com/Thriftpy/thriftpy2/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/ply[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/tornado[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cython3.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ tests/test_tornado.py::TornadoRPCTestCase::test_asynchronous_exception
+ tests/test_tornado.py::TornadoRPCTestCase::test_asynchronous_result
+ )
+
+ cd tests || die
+ epytest
+}