diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-10 20:18:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-10 20:18:34 +0100 |
commit | f1cd8f3514f8b9fbc1cc9cfe0dd08a8cb258e87a (patch) | |
tree | e16b2f573ffa54d21accbf0dfc3647b47b0578c8 /dev-python/scandir | |
parent | e9c5cd3a9230f2f3f5980a5ca0c4ec20c099c7ed (diff) |
gentoo auto-resync : 10:08:2022 - 20:18:34
Diffstat (limited to 'dev-python/scandir')
-rw-r--r-- | dev-python/scandir/Manifest | 2 | ||||
-rw-r--r-- | dev-python/scandir/files/scandir-1.10.0-python3.9.patch | 62 | ||||
-rw-r--r-- | dev-python/scandir/scandir-1.10.0-r3.ebuild | 27 |
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-python/scandir/Manifest b/dev-python/scandir/Manifest index ce35d4b93d69..1bae7f8195fa 100644 --- a/dev-python/scandir/Manifest +++ b/dev-python/scandir/Manifest @@ -1,3 +1,5 @@ +AUX scandir-1.10.0-python3.9.patch 2703 BLAKE2B bc37fbbf3cfb9c77db15a932b047f82af10b19890ef8e29979502a0d0d0bd3f71300a871a8a76d08ad606143c47ed3389e7a2f1c2f6376e3b86d32227ef0dfe8 SHA512 edd491cd68aee1a405b51113833a2cbde77f2146c0b3b1c807f2efff2cdbb307fe18d6a40f39b5b4567320dc52346feabf342472de308982bc46d03be28b5777 DIST scandir-1.10.0.tar.gz 33311 BLAKE2B 47576618c41a477ff7bab9daecf2e4719ed0c497a25fd68b4bacae073fc418f9fc51503812af726d1d124f07cccfb418ae09c196cf7ce283abf5d3bbc36b7e09 SHA512 42a570320018ffff2172ada67002334446c73c53813b36d63558d3854ded2fac0b266fcaf399cf9a735ceba110636b6901683fb26cde1e286ff476bc37e3d335 EBUILD scandir-1.10.0-r2.ebuild 584 BLAKE2B 72eda9a3d5eb828b5a00a765283c729a5245c6d2c213067a7a9a58248be39b272e56a12c2dc72064ef5e305ac7c5f6e9dd5ef4e5f730b8f042a7ca41a72613eb SHA512 2696963e0cbc0d63e2caf139a7deed1ed7ba418174ff6217cbc6edf693826a3f7fc89a7d6bc2438eb2769b1eaf7d135d7f5f01bf8675e659b96b1ce84e23f6be +EBUILD scandir-1.10.0-r3.ebuild 773 BLAKE2B 07b9b8580f5fae38d3f68ce6dcbc7a5b62717baffc1f62824b0bda48d4ae102f98f0e361dc85316867ec2cf587bf4883a5182ffe4b5efcf443b3c6094e9c3a5c SHA512 a978ab19d5eaa3c836a657dd82c864dcf6887377d1ef4aedc68e2a6c752e6f2f3c34cd10a05d0ab2553e3f4c63e5791139c5aee5b6544e2172c67d5a3c49b871 MISC metadata.xml 496 BLAKE2B a5e4d74cf0526a99d2c968bd225f6b5d284a7f532e18ab5d1ec8f2da6b43d25c323d194982ccdc29d216c42fde989f1515c07fd8d65ff2d464191fc428125140 SHA512 66ead6b25749d156a0b702f558ee93005653de6c2039e3d76c7567606154e5720ea4da69944f725eb1598254cc251f091a46fddd03df695a1aa88058c64d4df7 diff --git a/dev-python/scandir/files/scandir-1.10.0-python3.9.patch b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch new file mode 100644 index 000000000000..c8683c1c6b9b --- /dev/null +++ b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch @@ -0,0 +1,62 @@ +https://github.com/benhoyt/scandir/commit/3396aa4155ffde8600a0e9ca50d5872569169b5d + +From 3396aa4155ffde8600a0e9ca50d5872569169b5d Mon Sep 17 00:00:00 2001 +From: Ben Hoyt <benhoyt@gmail.com> +Date: Mon, 24 Jan 2022 08:44:07 +1300 +Subject: [PATCH] Add Python 3.10 to tests (#137) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix PyStructSequence_UnnamedField build issues on Python 3.9/3.10 + +_scandir.c:663:7: error: conflicting type qualifiers for ‘PyStructSequence_UnnamedField’ + 663 | char *PyStructSequence_UnnamedField = "unnamed field"; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from /usr/local/include/python3.10/Python.h:127, + from _scandir.c:14: +/usr/local/include/python3.10/structseq.h:22:27: note: previous declaration of ‘PyStructSequence_UnnamedField’ was here + 22 | extern const char * const PyStructSequence_UnnamedField; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Fixes https://github.com/benhoyt/scandir/pull/137 +--- + _scandir.c | 10 +++++----- + scandir.py | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/_scandir.c b/_scandir.c +index 6cc28c8..433483f 100644 +--- a/_scandir.c ++++ b/_scandir.c +@@ -660,7 +660,7 @@ _pystat_fromstructstat(STRUCT_STAT *st) + return v; + } + +-char *PyStructSequence_UnnamedField = "unnamed field"; ++static char *scandir_unnamed_field = "unnamed field"; + + PyDoc_STRVAR(stat_result__doc__, + "stat_result: Result from stat, fstat, or lstat.\n\n\ +@@ -681,7 +681,7 @@ static PyStructSequence_Field stat_result_fields[] = { + {"st_uid", "user ID of owner"}, + {"st_gid", "group ID of owner"}, + {"st_size", "total size, in bytes"}, +- /* The NULL is replaced with PyStructSequence_UnnamedField later. */ ++ /* The NULL is replaced with scandir_unnamed_field later. */ + {NULL, "integer time of last access"}, + {NULL, "integer time of last modification"}, + {NULL, "integer time of last change"}, +@@ -1817,9 +1817,9 @@ init_scandir(void) + if (!billion) + INIT_ERROR; + +- stat_result_desc.fields[7].name = PyStructSequence_UnnamedField; +- stat_result_desc.fields[8].name = PyStructSequence_UnnamedField; +- stat_result_desc.fields[9].name = PyStructSequence_UnnamedField; ++ stat_result_desc.fields[7].name = scandir_unnamed_field; ++ stat_result_desc.fields[8].name = scandir_unnamed_field; ++ stat_result_desc.fields[9].name = scandir_unnamed_field; + PyStructSequence_InitType(&StatResultType, &stat_result_desc); + structseq_new = StatResultType.tp_new; + StatResultType.tp_new = statresult_new; diff --git a/dev-python/scandir/scandir-1.10.0-r3.ebuild b/dev-python/scandir/scandir-1.10.0-r3.ebuild new file mode 100644 index 000000000000..ac31277480d8 --- /dev/null +++ b/dev-python/scandir/scandir-1.10.0-r3.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +# Do NOT add Python 3.11 without verifying the C extension is actually built +# and installed for it! +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 + +DESCRIPTION="A better directory iterator and faster os.walk()" +HOMEPAGE="https://github.com/benhoyt/scandir" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +PATCHES=( + "${FILESDIR}"/${P}-python3.9.patch +) + +python_test() { + "${EPYTHON}" test/run_tests.py -v || die "tests failed under ${EPYTHON}" +} |