From b0e84ed80553d3d1f1b5431e3e01071cab0828cd Mon Sep 17 00:00:00 2001 From: mxmlnkn Date: Sun, 6 Oct 2024 18:30:37 +0200 Subject: [PATCH] fixup! [feature] Implement a faster git backend that works with pygit2 >= 1.15 --- .github/workflows/tests.yml | 2 ++ core/pyproject.toml | 4 ++-- core/ratarmountcore/factory.py | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1369e69b..2248ac40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -204,7 +204,9 @@ jobs: echo "Try to repair wheel" zip -F dist/*whl --out fixed zip -FF dist/*whl --out fixed + ls -la || true test -f fixed && mv fixed dist/*whl + test -f fixed.zip && mv fixed.zip dist/*whl twine check dist/* python3 -m pip install "$( find dist -name '*.tar.gz' | head -1 )"[full] diff --git a/core/pyproject.toml b/core/pyproject.toml index 27e553c2..95a75113 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -86,7 +86,7 @@ full = [ # https://github.com/libgit2/pygit2/issues/1316 # https://github.com/fsspec/filesystem_spec/pull/1703 # build error in Python 3.13 because it requires libgit2 1.8.1 and there are no wheels - "pygit2", + "pygit2<1.15", "fsspec", "s3fs", #"gcsfs", # untested @@ -108,7 +108,7 @@ fsspec = [ # https://github.com/libgit2/pygit2/issues/1316 # https://github.com/fsspec/filesystem_spec/pull/1703 # build error in Python 3.13 because it requires libgit2 1.8.1 and there are no wheels - "pygit2", + "pygit2<1.15", "fsspec", "s3fs", #"gcsfs", # untested diff --git a/core/ratarmountcore/factory.py b/core/ratarmountcore/factory.py index 470ee96d..81c9030f 100644 --- a/core/ratarmountcore/factory.py +++ b/core/ratarmountcore/factory.py @@ -164,6 +164,11 @@ def openFsspec(url, options, printDebug: int) -> Optional[Union[MountSource, IO[ if stat.S_ISDIR(fileInfo.mode): mountSource.prefix = pathInsideRepository else: + # Add tarFileName argument so that mounting a TAR file via SSH can create a properly named index + # file inside ~/.cache/ratarmount. + if 'tarFileName' not in options: + options['tarFileName'] = url + # In the future it might be necessary to extend the lifetime of mountSource by adding it as # a member of the opened file, but not right now. return mountSource.open(fileInfo)