From ab3da91fb6c91a9df52fff8f991570f456fd3c7a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 18 Dec 2020 11:06:49 +0000 Subject: gentoo resync : 18.12.2020 --- dev-python/fsspec/Manifest | 5 +- .../fsspec/files/fsspec-0.8.2-test-cleanup.patch | 80 ++++++++++++++++++++++ dev-python/fsspec/fsspec-0.8.2.ebuild | 4 ++ dev-python/fsspec/fsspec-0.8.5.ebuild | 50 ++++++++++++++ 4 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 dev-python/fsspec/files/fsspec-0.8.2-test-cleanup.patch create mode 100644 dev-python/fsspec/fsspec-0.8.5.ebuild (limited to 'dev-python/fsspec') diff --git a/dev-python/fsspec/Manifest b/dev-python/fsspec/Manifest index ab301a6bc631..7bb435436271 100644 --- a/dev-python/fsspec/Manifest +++ b/dev-python/fsspec/Manifest @@ -1,3 +1,6 @@ +AUX fsspec-0.8.2-test-cleanup.patch 3768 BLAKE2B 7c6467294e9295a02b5a7d001314335c96b1dd415903917750427fa55b2c178fd3d363f9b5bd7b9f54bca70f8e944afdeddbe125ec8ef6b03fc61fecce02d92d SHA512 99bf76a51bc7e5294b6e93e1ad4509039aeb614b87ad7eaf0005993345f57b68019fb4d16546cc6fff56d47b20e2648dd550e7aefda132da6883ef49cd6255cd DIST filesystem_spec-0.8.2.tar.gz 238399 BLAKE2B f64f153dd303bd3ec44e5010507704b5cbb50a89ad4a7a2e50b38b139219896be543bcff0fe0a99e06f015450f4b0334a641fabeeeb23583b14665ef8f089159 SHA512 e30badc56871ef20cf4b2ce0f6353b4125632d9e253f68d4b08535c9e1ac5fe428745315cee89a9536bfd1b308a28cc65fff555a7b9d9511225357bf790b9aac -EBUILD fsspec-0.8.2.ebuild 1125 BLAKE2B 0bccc38c8897fb91ed9b92bdb2c93cbf9533697e8fb7e2f7da99eb8f035abe2aca6ff5fdaca6cf3f208a5b95890aff53ea29e2d0ca6f9efb870a050953806168 SHA512 e46654cdfb0d7f48534c2a1c1b555788e0dbb36792a04aa2e03ded236eeeeceb41d5c4b684dad38236d02e9aa4577686d8ae0cd49be8b902c8822e987cfe58df +DIST filesystem_spec-0.8.5.tar.gz 255904 BLAKE2B df400276dbc53a453e9e9a00acb2e93a86a5f239237533bab036a16bd48d6d709f68241febe75f6f72281162ba4a563a087405a1064e18805ce2501095d778fb SHA512 20001fd02348f15e764a9e20eab98267f6746bd7e86187914d3db3098061aa62cb296595c3519696ae1e99ef896d49df0fcec846aaf6e5c281dd1a344ef6c393 +EBUILD fsspec-0.8.2.ebuild 1185 BLAKE2B df4ff4b6fdd2fb7176108fe9df4113a6d8ebad7cc4312429bfac5e3f94066c614b785decb8c77479aa6f32ef74216b04796e6f389e0932ca363a485c8359aab3 SHA512 ffe725a452595176cd0a6282e84046c612b8043935838a37e9e1a155df8995501e53c5b04424ed0f783eb5cb2e63d4c5f827b05c435a61be4314244054d387c2 +EBUILD fsspec-0.8.5.ebuild 1187 BLAKE2B 9c0ab02a29ed6787c18b81ffcef77f538f22ec9d46418c0d4fb7d0563afd3c8fb7cea52355c49cc9dea34121eb36609ecb01dff85199b0b7c351a1911646eb5a SHA512 9d60ea2220db8b7d1d6f0efcf4d404d9dd5c87c5c95e3e2bb48b2e3f0e2ea026415d97ce8726f71961bb47f3bb2f0b350165e6be6617b0851f135db3f7542a1d MISC metadata.xml 373 BLAKE2B 8932a3ec06759eeef7bb91a181e07ceeef606995e944a6396d21ee6f9b26a7958e9c40f9f54ae27ebdfb9c7974b1ad79963213bb7a5b9bbb282cf35967a1ffe9 SHA512 42e44963570b3b003550ef6f60d1557866a72f362a3d98ca2a7900377422921134e4c8b7bcb6af3ea8bc061b433e4aba96de4fa5643a1f424cc64665a7efd654 diff --git a/dev-python/fsspec/files/fsspec-0.8.2-test-cleanup.patch b/dev-python/fsspec/files/fsspec-0.8.2-test-cleanup.patch new file mode 100644 index 000000000000..8227c2d23c66 --- /dev/null +++ b/dev-python/fsspec/files/fsspec-0.8.2-test-cleanup.patch @@ -0,0 +1,80 @@ +From f933694238f78fbef91367d5051d515e0f9d0635 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Wed, 16 Dec 2020 11:32:04 +0100 +Subject: [PATCH] clean up properly after test_git + +Restore original directory after test_git. Otherwise, next tests +are run in non-existing directory and fail: + +[...] +> cwd = os.getcwd() +E FileNotFoundError: [Errno 2] No such file or directory + +/usr/lib/python3.9/site-packages/gunicorn/util.py:443: FileNotFoundError + +While at it, reflow the logic so that the temporary directory is always +cleaned, even if the test fails in middle of setup. +--- + fsspec/implementations/tests/test_git.py | 42 +++++++++++++----------- + 1 file changed, 22 insertions(+), 20 deletions(-) + +diff --git a/fsspec/implementations/tests/test_git.py b/fsspec/implementations/tests/test_git.py +index 562b228..4cd4c3f 100644 +--- a/fsspec/implementations/tests/test_git.py ++++ b/fsspec/implementations/tests/test_git.py +@@ -10,30 +10,32 @@ pygit2 = pytest.importorskip("pygit2") + + @pytest.fixture() + def repo(): ++ orig_dir = os.getcwd() + d = tempfile.mkdtemp() +- os.chdir(d) +- subprocess.call("git init", shell=True, cwd=d) +- subprocess.call("git init", shell=True, cwd=d) +- subprocess.call('git config user.email "you@example.com"', shell=True, cwd=d) +- subprocess.call('git config user.name "Your Name"', shell=True, cwd=d) +- open(os.path.join(d, "file1"), "wb").write(b"data0") +- subprocess.call("git add file1", shell=True, cwd=d) +- subprocess.call('git commit -m "init"', shell=True, cwd=d) +- sha = open(os.path.join(d, ".git/refs/heads/master"), "r").read().strip() +- open(os.path.join(d, "file1"), "wb").write(b"data00") +- subprocess.check_output('git commit -a -m "tagger"', shell=True, cwd=d) +- subprocess.call('git tag -a thetag -m "make tag"', shell=True, cwd=d) +- open(os.path.join(d, "file2"), "wb").write(b"data000") +- subprocess.call("git add file2", shell=True) +- subprocess.call('git commit -m "master tip"', shell=True, cwd=d) +- subprocess.call("git checkout -b abranch", shell=True, cwd=d) +- os.mkdir("inner") +- open(os.path.join(d, "inner", "file1"), "wb").write(b"data3") +- subprocess.call("git add inner/file1", shell=True, cwd=d) +- subprocess.call('git commit -m "branch tip"', shell=True, cwd=d) + try: ++ os.chdir(d) ++ subprocess.call("git init", shell=True, cwd=d) ++ subprocess.call("git init", shell=True, cwd=d) ++ subprocess.call('git config user.email "you@example.com"', shell=True, cwd=d) ++ subprocess.call('git config user.name "Your Name"', shell=True, cwd=d) ++ open(os.path.join(d, "file1"), "wb").write(b"data0") ++ subprocess.call("git add file1", shell=True, cwd=d) ++ subprocess.call('git commit -m "init"', shell=True, cwd=d) ++ sha = open(os.path.join(d, ".git/refs/heads/master"), "r").read().strip() ++ open(os.path.join(d, "file1"), "wb").write(b"data00") ++ subprocess.check_output('git commit -a -m "tagger"', shell=True, cwd=d) ++ subprocess.call('git tag -a thetag -m "make tag"', shell=True, cwd=d) ++ open(os.path.join(d, "file2"), "wb").write(b"data000") ++ subprocess.call("git add file2", shell=True) ++ subprocess.call('git commit -m "master tip"', shell=True, cwd=d) ++ subprocess.call("git checkout -b abranch", shell=True, cwd=d) ++ os.mkdir("inner") ++ open(os.path.join(d, "inner", "file1"), "wb").write(b"data3") ++ subprocess.call("git add inner/file1", shell=True, cwd=d) ++ subprocess.call('git commit -m "branch tip"', shell=True, cwd=d) + yield d, sha + finally: ++ os.chdir(orig_dir) + shutil.rmtree(d) + + +-- +2.29.2 + diff --git a/dev-python/fsspec/fsspec-0.8.2.ebuild b/dev-python/fsspec/fsspec-0.8.2.ebuild index fe649f0feac4..7e7f5fb6a323 100644 --- a/dev-python/fsspec/fsspec-0.8.2.ebuild +++ b/dev-python/fsspec/fsspec-0.8.2.ebuild @@ -31,6 +31,10 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + "${FILESDIR}"/fsspec-0.8.2-test-cleanup.patch +) + src_test() { git config --global user.email "you@example.com" || die git config --global user.name "Your Name" || die diff --git a/dev-python/fsspec/fsspec-0.8.5.ebuild b/dev-python/fsspec/fsspec-0.8.5.ebuild new file mode 100644 index 000000000000..42f59375ae3e --- /dev/null +++ b/dev-python/fsspec/fsspec-0.8.5.ebuild @@ -0,0 +1,50 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) +inherit distutils-r1 + +MY_P=filesystem_spec-${PV} + +DESCRIPTION="A specification that python filesystems should adhere to" +HOMEPAGE="https://github.com/intake/filesystem_spec/ + https://pypi.org/project/fsspec/" +SRC_URI=" + https://github.com/intake/filesystem_spec/archive/${PV}.tar.gz + -> ${MY_P}.tar.gz" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +BDEPEND=" + dev-python/versioneer[${PYTHON_USEDEP}] + test? ( + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-vcs/git + )" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/fsspec-0.8.2-test-cleanup.patch +) + +src_test() { + git config --global user.email "you@example.com" || die + git config --global user.name "Your Name" || die + distutils-r1_src_test +} + +python_test() { + # sftp and smb require server started via docker + pytest -vv \ + --ignore fsspec/implementations/tests/test_sftp.py \ + --ignore fsspec/implementations/tests/test_smb.py || + die "Tests failed with ${EPYTHON}" +} -- cgit v1.2.3