Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/fsspec/, dev-python/fsspec/files/
Date: Wed, 23 Jun 2021 07:31:33
Message-Id: 1624433485.3896d07bc010c1e1f66172772d0040460fdde453.mgorny@gentoo
1 commit: 3896d07bc010c1e1f66172772d0040460fdde453
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 23 06:55:21 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 23 07:31:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3896d07b
7
8 dev-python/fsspec: Bump to 2021.06.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/fsspec/Manifest | 1 +
13 .../fsspec/files/fsspec-2021.06.1-ujson.patch | 32 ++++++++++++++
14 dev-python/fsspec/fsspec-2021.06.1.ebuild | 51 ++++++++++++++++++++++
15 3 files changed, 84 insertions(+)
16
17 diff --git a/dev-python/fsspec/Manifest b/dev-python/fsspec/Manifest
18 index 4f23bc45b1e..418da215814 100644
19 --- a/dev-python/fsspec/Manifest
20 +++ b/dev-python/fsspec/Manifest
21 @@ -1 +1,2 @@
22 DIST filesystem_spec-2021.05.0.tar.gz 292796 BLAKE2B 5d56d860ced1a72c27d2031b7d257a4bcbd52f6b2fed5275fbcbf7088375fde26652f0a003e919ebd3948d5e9833d802304234282ca858a7a2a19bfa11f66aa8 SHA512 7c27a1ad4e21efdcc0f31f91a9929e4c09db7b9421e7bf8d2f485e961f6887a4a5c083f38f8d7b09005a4cf11f55c93cce4617e3dc6c2b241ed20f7847ad711e
23 +DIST filesystem_spec-2021.06.1.tar.gz 297254 BLAKE2B e360c0780df2ace31a2a7e15f7269f23140ddbc6bd6a1f657cfddbab2b1f285d79a0c88f8d63e406d4a53fd3737f77012eb9837479707a778ab043503ade9d18 SHA512 1d59c2c53b1a4a604ff3762eca8484d7ed60fba98548cc77d7ed014ddf1513cef046ceeec41911cdecd414bdbb4e3c669a3a3f65da08dabf5a70cc2985d06b73
24
25 diff --git a/dev-python/fsspec/files/fsspec-2021.06.1-ujson.patch b/dev-python/fsspec/files/fsspec-2021.06.1-ujson.patch
26 new file mode 100644
27 index 00000000000..0c76d8ac71d
28 --- /dev/null
29 +++ b/dev-python/fsspec/files/fsspec-2021.06.1-ujson.patch
30 @@ -0,0 +1,32 @@
31 +From 270423008d401d9f03a31f08c53a7b13fa193573 Mon Sep 17 00:00:00 2001
32 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
33 +Date: Wed, 23 Jun 2021 09:23:31 +0200
34 +Subject: [PATCH] Fix test_unmodel to accept ujson encoding without whitespace
35 +
36 +The ujson encoding for test_unmodel data is b'"Conventions":"UGRID-0.9.0"'
37 +(without a space after ':') that breaks the test for me. Update
38 +the test to make the whitespace optional.
39 +
40 +That said, I have tried multiple ujson versions, going back to <3,
41 +and was not able to reproduce the output with space.
42 +---
43 + fsspec/implementations/tests/test_reference.py | 3 ++-
44 + 1 file changed, 2 insertions(+), 1 deletion(-)
45 +
46 +diff --git a/fsspec/implementations/tests/test_reference.py b/fsspec/implementations/tests/test_reference.py
47 +index a1a8fdc..15a32d5 100644
48 +--- a/fsspec/implementations/tests/test_reference.py
49 ++++ b/fsspec/implementations/tests/test_reference.py
50 +@@ -104,7 +104,8 @@ jdata = """{
51 +
52 + def test_unmodel():
53 + refs = _unmodel_hdf5(json.loads(jdata))
54 +- assert b'"Conventions": "UGRID-0.9.0"' in refs[".zattrs"]
55 ++ # apparently the output may or may not contain a space after ':'
56 ++ assert b'"Conventions":"UGRID-0.9.0"' in refs[".zattrs"].replace(b' ', b'')
57 + assert refs["adcirc_mesh/0"] == ("https://url", 8928, 8932)
58 +
59 +
60 +--
61 +2.32.0
62 +
63
64 diff --git a/dev-python/fsspec/fsspec-2021.06.1.ebuild b/dev-python/fsspec/fsspec-2021.06.1.ebuild
65 new file mode 100644
66 index 00000000000..38f77d30991
67 --- /dev/null
68 +++ b/dev-python/fsspec/fsspec-2021.06.1.ebuild
69 @@ -0,0 +1,51 @@
70 +# Copyright 2020-2021 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +PYTHON_COMPAT=( python3_{8..9} )
76 +inherit distutils-r1
77 +
78 +MY_P=filesystem_spec-${PV}
79 +
80 +DESCRIPTION="A specification that python filesystems should adhere to"
81 +HOMEPAGE="https://github.com/intake/filesystem_spec/
82 + https://pypi.org/project/fsspec/"
83 +SRC_URI="
84 + https://github.com/intake/filesystem_spec/archive/${PV}.tar.gz
85 + -> ${MY_P}.tar.gz"
86 +S=${WORKDIR}/${MY_P}
87 +
88 +LICENSE="BSD"
89 +SLOT="0"
90 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
91 +
92 +BDEPEND="
93 + dev-python/versioneer[${PYTHON_USEDEP}]
94 + test? (
95 + dev-python/aiohttp[${PYTHON_USEDEP}]
96 + dev-python/numpy[${PYTHON_USEDEP}]
97 + dev-python/requests[${PYTHON_USEDEP}]
98 + dev-vcs/git
99 + )"
100 +
101 +distutils_enable_tests pytest
102 +
103 +PATCHES=(
104 + "${FILESDIR}"/${P}-ujson.patch
105 +)
106 +
107 +src_test() {
108 + git config --global user.email "you@×××××××.com" || die
109 + git config --global user.name "Your Name" || die
110 + distutils-r1_src_test
111 +}
112 +
113 +python_test() {
114 + # sftp and smb require server started via docker
115 + epytest \
116 + --deselect fsspec/tests/test_spec.py::test_find \
117 + --ignore fsspec/implementations/tests/test_dbfs.py \
118 + --ignore fsspec/implementations/tests/test_sftp.py \
119 + --ignore fsspec/implementations/tests/test_smb.py
120 +}