From a869ab0702e266d6876482cf86566d3bd633d0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 8 Oct 2015 17:03:35 -0400 Subject: [PATCH] try to fix RTD build *again* *again* --- borg/cache.py | 6 ++++-- borg/fuse.py | 6 ++++-- borg/remote.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/borg/cache.py b/borg/cache.py index e034c8400..0f559f15e 100644 --- a/borg/cache.py +++ b/borg/cache.py @@ -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 diff --git a/borg/fuse.py b/borg/fuse.py index a54a417b8..d7a5aa5ce 100644 --- a/borg/fuse.py +++ b/borg/fuse.py @@ -2,15 +2,17 @@ from collections import defaultdict import errno import io import llfuse -import msgpack import os import stat import tempfile import time from .archive import Archive -from .helpers import daemonize +from .helpers import daemonize, have_cython from .remote import cache_if_remote +if have_cython: + import msgpack + # Does this version of llfuse support ns precision? have_fuse_mtime_ns = hasattr(llfuse.EntryAttributes, 'st_mtime_ns') diff --git a/borg/remote.py b/borg/remote.py index b9847c7e4..466d627da 100644 --- a/borg/remote.py +++ b/borg/remote.py @@ -1,6 +1,5 @@ import errno import fcntl -import msgpack import os 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 +if have_cython: + import msgpack + BUFSIZE = 10 * 1024 * 1024