@@ -1,7 +1,6 @@
import configparser
from .remote import cache_if_remote
import errno
-import msgpack
import os
import stat
import sys
@@ -12,10 +11,13 @@ import tempfile
from .key import PlaintextKey
from .helpers import Error, get_cache_dir, decode_dict, st_mtime_ns, unhexlify, int_to_bigint, \
- bigint_to_int
+ bigint_to_int, have_cython
from .locking import UpgradableLock
from .hashindex import ChunkIndex
+if have_cython:
+ import msgpack
+
class Cache:
"""Client Side cache
@@ -2,15 +2,17 @@ from collections import defaultdict
import io
import llfuse
import tempfile
import time
from .archive import Archive
-from .helpers import daemonize
+from .helpers import daemonize, have_cython
# Does this version of llfuse support ns precision?
have_fuse_mtime_ns = hasattr(llfuse.EntryAttributes, 'st_mtime_ns')
@@ -1,6 +1,5 @@
import fcntl
import select
import shlex
@@ -11,9 +10,12 @@ import traceback
from . import __version__
-from .helpers import Error, IntegrityError
+from .helpers import Error, IntegrityError, have_cython
from .repository import Repository
BUFSIZE = 10 * 1024 * 1024