diff options
author | Sam James <sam@gentoo.org> | 2023-06-24 11:25:43 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-06-24 11:52:35 +0100 |
commit | 2e20c62c163b8c3c3e793cd0ab5277e7cc2ebed2 (patch) | |
tree | 377d94ebc5be9253a5a460e9fb2fe77d60f46c6b /dev-python/rarfile | |
parent | dev-lang/perl: switch to .xz, CPAN source, back to 5.38.0_rc2 (diff) | |
download | gentoo-2e20c62c163b8c3c3e793cd0ab5277e7cc2ebed2.tar.gz gentoo-2e20c62c163b8c3c3e793cd0ab5277e7cc2ebed2.tar.bz2 gentoo-2e20c62c163b8c3c3e793cd0ab5277e7cc2ebed2.zip |
dev-python/rarfile: enable py3.12, fix pypy3 tests, PEP517
Fixes: 0a18d08236f7980cd5207392c733c46a1f1282e2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/rarfile')
-rw-r--r-- | dev-python/rarfile/files/rarfile-4.0-fix-pypy-datetime.patch | 19 | ||||
-rw-r--r-- | dev-python/rarfile/rarfile-4.0-r2.ebuild (renamed from dev-python/rarfile/rarfile-4.0-r1.ebuild) | 9 |
2 files changed, 25 insertions, 3 deletions
diff --git a/dev-python/rarfile/files/rarfile-4.0-fix-pypy-datetime.patch b/dev-python/rarfile/files/rarfile-4.0-fix-pypy-datetime.patch new file mode 100644 index 000000000000..8973ce91dffb --- /dev/null +++ b/dev-python/rarfile/files/rarfile-4.0-fix-pypy-datetime.patch @@ -0,0 +1,19 @@ +https://github.com/markokr/rarfile/commit/cd9e650e5294f9c5cd4effcd9705c38a760afde6 + +From cd9e650e5294f9c5cd4effcd9705c38a760afde6 Mon Sep 17 00:00:00 2001 +From: Marko Kreen <markokr@gmail.com> +Date: Fri, 5 Aug 2022 19:02:09 +0300 +Subject: [PATCH] nsdatetime: support pypy internal use + +--- a/rarfile.py ++++ b/rarfile.py +@@ -3121,7 +3121,7 @@ class nsdatetime(datetime): + __slots__ = ("nanosecond",) + nanosecond: int #: Number of nanoseconds, 0 <= nanosecond < 999999999 + +- def __new__(cls, year, month, day, hour=0, minute=0, second=0, ++ def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0, + microsecond=0, tzinfo=None, *, fold=0, nanosecond=0): + usec, mod = divmod(nanosecond, 1000) if nanosecond else (microsecond, 0) + if mod == 0: + diff --git a/dev-python/rarfile/rarfile-4.0-r1.ebuild b/dev-python/rarfile/rarfile-4.0-r2.ebuild index b4e875c7ab72..7080df4c13ce 100644 --- a/dev-python/rarfile/rarfile-4.0-r1.ebuild +++ b/dev-python/rarfile/rarfile-4.0-r2.ebuild @@ -3,8 +3,8 @@ EAPI=8 -DISTUTLS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} pypy3 ) +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} pypy3 ) inherit distutils-r1 pypi DESCRIPTION="Module for RAR archive reading" @@ -18,6 +18,9 @@ REQUIRED_USE="test? ( compressed )" RDEPEND="compressed? ( app-arch/unrar )" -PATCHES=( "${FILESDIR}"/${P}.patch ) +PATCHES=( + "${FILESDIR}"/${P}.patch + "${FILESDIR}"/${P}-fix-pypy-datetime.patch +) distutils_enable_tests pytest |