dev-python/fsspec: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-05-09 11:36:43 +02:00
parent b7ba67d0ed
commit 3435a2c81a
5 changed files with 0 additions and 229 deletions
-3
View File
@@ -1,4 +1 @@
DIST filesystem_spec-0.8.5.tar.gz 255904 BLAKE2B df400276dbc53a453e9e9a00acb2e93a86a5f239237533bab036a16bd48d6d709f68241febe75f6f72281162ba4a563a087405a1064e18805ce2501095d778fb SHA512 20001fd02348f15e764a9e20eab98267f6746bd7e86187914d3db3098061aa62cb296595c3519696ae1e99ef896d49df0fcec846aaf6e5c281dd1a344ef6c393
DIST filesystem_spec-0.8.7.tar.gz 277744 BLAKE2B 4957b716d622ecd2a1bb381b291253970682dde2c90a0e8dd76dfcc3ce3c9ba55846d97df8c1fcedd4e0d5af1c10eccc6c94418f2e78e9fffde846d12c11e170 SHA512 6eb89bf1e19ac1313aad2217aaaf4686f2e2e831a2cd339f9e12b8319fb080b82f0b90b10af53c2e6febd98a34ae8520444fee3c6394e7ab5fd5ca68d56e5454
DIST filesystem_spec-0.9.0.tar.gz 286641 BLAKE2B 70603c14d955640251f0922afaf7fa7cd3739c827218cb708fac27883b671e059ef17eb02b4d482904278855d06958e2159b49e232c558f78befd925472bca6f SHA512 68235dc592a7c7e85e5aab1b4409825f9c0a15c6841f96f54cef66c1b6ef166e930b910bd140bbaeb818f2f1f3dfc9a5752f3c479a97b6c5ce8e7d7ea98721af
DIST filesystem_spec-2021.04.0.tar.gz 288179 BLAKE2B 896982345533fef9593f393209202e0a90473e9826ced9d69854dca20c66c64b85e1b1c44413dda718cdd1af7f41ac821b4d67b600536b32a873a4f73ab32801 SHA512 6806d6fbae89b514955a309346f19b2d199db10aecece728d117798368c311e3fbb38161fd5a54ea4a60ee7e656d2e50fdf8c4444ec3d6bdd761229b4a6341f2
@@ -1,80 +0,0 @@
From f933694238f78fbef91367d5051d515e0f9d0635 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
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
-50
View File
@@ -1,50 +0,0 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..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}"
}
-48
View File
@@ -1,48 +0,0 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..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
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 \
--deselect fsspec/tests/test_spec.py::test_find \
--ignore fsspec/implementations/tests/test_dbfs.py \
--ignore fsspec/implementations/tests/test_sftp.py \
--ignore fsspec/implementations/tests/test_smb.py ||
die "Tests failed with ${EPYTHON}"
}
-48
View File
@@ -1,48 +0,0 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..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
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 \
--deselect fsspec/tests/test_spec.py::test_find \
--ignore fsspec/implementations/tests/test_dbfs.py \
--ignore fsspec/implementations/tests/test_sftp.py \
--ignore fsspec/implementations/tests/test_smb.py ||
die "Tests failed with ${EPYTHON}"
}