dev-python/thriftpy2: Bump to 0.5.3

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-09-06 19:27:07 +02:00
parent 2766decf12
commit 4f2a291077
3 changed files with 75 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST thriftpy2-0.5.2.tar.gz 782261 BLAKE2B 657e8dadd8757f9f0f6b4a7f73e4347651f6301c969cf4d2c37cf87c6176322b7afad6372a39ed7d4c9f36d07850d6ae4edb73ff08dd3530b88e0194032abc9b SHA512 89a73d70b7ba74acc5344c1471587a66664331fb3d160eeb31d27434c78a3e76e3ec0d84dec14ec57d0bcc89e867759883d69247ae65bff1a9a8a00fc8ff7747
DIST thriftpy2-0.5.3.tar.gz 814230 BLAKE2B 33e4702350d22e4f4c1eb4fedfc9358de93012511bcbdee95f266b9b45be85f16040f673c35fa47fd42dc498d2b132b13a1a6c49e957d9b551cd151ddd328e49 SHA512 09a66b623db6ad8e67d0e8ade9c5d2786f6d8fb967cd47492d48812a4553be2d2c50c5de1192a0d7fabc599d94cb50bdc94b73500d48b76804287cb91e9e3e89

View File

@@ -0,0 +1,30 @@
diff --git a/setup.py b/setup.py
index e4741c6..3294b1a 100644
--- a/setup.py
+++ b/setup.py
@@ -3,16 +3,20 @@
import sys
import platform
-import toml
+if sys.version_info < (3, 11):
+ import tomli as tomllib
+else:
+ import tomllib
from os.path import join, dirname
from setuptools import setup, find_packages, Extension
-meta = toml.load(join(dirname(__file__), 'pyproject.toml') )
-install_requires = meta["project"]["dependencies"]
-dev_requires = meta["project"]["optional-dependencies"]["dev"]
-tornado_requires = meta["project"]["optional-dependencies"]["tornado"]
+with open(join(dirname(__file__), 'pyproject.toml'), "rb") as f:
+ meta = tomllib.load(f)
+ install_requires = meta["project"]["dependencies"]
+ dev_requires = meta["project"]["optional-dependencies"]["dev"]
+ tornado_requires = meta["project"]["optional-dependencies"]["tornado"]
try:
from tornado import version as tornado_version

View File

@@ -0,0 +1,44 @@
# Copyright 2021-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_{11..13} )
inherit distutils-r1 pypi
DESCRIPTION="Pure python approach of Apache Thrift"
HOMEPAGE="
https://github.com/Thriftpy/thriftpy2/
https://pypi.org/project/thriftpy2/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
<dev-python/ply-4[${PYTHON_USEDEP}]
<dev-python/six-2[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/cython-3.0.10[${PYTHON_USEDEP}]
test? (
dev-python/tornado[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-{asyncio,reraise} )
distutils_enable_tests pytest
PATCHES=(
# https://github.com/Thriftpy/thriftpy2/pull/319
"${FILESDIR}/${P}-tomllib.patch"
)
python_test() {
cd tests || die
epytest
}