mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-08 15:37:09 +00:00
fix all references to package name
use relative imports if possible reorder imports (1. stdlib 2. dependencies 3. borg 4. borg.testsuite)
This commit is contained in:
parent
78bfc58b47
commit
5e98400a5a
32 changed files with 136 additions and 115 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1 +1 @@
|
|||
attic/_version.py export-subst
|
||||
borg/_version.py export-subst
|
||||
|
|
|
@ -9,4 +9,4 @@ install:
|
|||
- "pip install --use-mirrors Cython"
|
||||
- "pip install -e ."
|
||||
# command to run tests
|
||||
script: fakeroot -u python -m attic.testsuite.run -vb
|
||||
script: fakeroot -u python -m borg.testsuite.run -vb
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include README.rst LICENSE CHANGES MANIFEST.in versioneer.py
|
||||
recursive-include attic *.pyx
|
||||
recursive-include borg *.pyx
|
||||
recursive-include docs *
|
||||
recursive-exclude docs *.pyc
|
||||
recursive-exclude docs *.pyo
|
||||
prune docs/_build
|
||||
include attic/_version.py
|
||||
include borg/_version.py
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# these strings are filled in when 'setup.py versioneer' creates _version.py
|
||||
tag_prefix = ""
|
||||
parentdir_prefix = "borgbackup-"
|
||||
versionfile_source = "attic/_version.py"
|
||||
versionfile_source = "borg/_version.py"
|
||||
|
||||
|
||||
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
import errno
|
||||
import shutil
|
||||
import tempfile
|
||||
from attic.key import key_factory
|
||||
from attic.remote import cache_if_remote
|
||||
from .key import key_factory
|
||||
from .remote import cache_if_remote
|
||||
import msgpack
|
||||
import os
|
||||
import socket
|
||||
|
@ -13,11 +13,11 @@
|
|||
import sys
|
||||
import time
|
||||
from io import BytesIO
|
||||
from attic import xattr
|
||||
from attic.platform import acl_get, acl_set
|
||||
from attic.chunker import Chunker
|
||||
from attic.hashindex import ChunkIndex
|
||||
from attic.helpers import parse_timestamp, Error, uid2user, user2uid, gid2group, group2gid, \
|
||||
from . import xattr
|
||||
from .platform import acl_get, acl_set
|
||||
from .chunker import Chunker
|
||||
from .hashindex import ChunkIndex
|
||||
from .helpers import parse_timestamp, Error, uid2user, user2uid, gid2group, group2gid, \
|
||||
Manifest, Statistics, decode_dict, st_mtime_ns, make_path_safe, StableDict, int_to_bigint, bigint_to_int
|
||||
|
||||
ITEMS_BUFFER = 1024 * 1024
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
import textwrap
|
||||
import traceback
|
||||
|
||||
from attic import __version__
|
||||
from attic.archive import Archive, ArchiveChecker
|
||||
from attic.repository import Repository
|
||||
from attic.cache import Cache
|
||||
from attic.key import key_creator
|
||||
from attic.helpers import Error, location_validator, format_time, format_file_size, \
|
||||
from . import __version__
|
||||
from .archive import Archive, ArchiveChecker
|
||||
from .repository import Repository
|
||||
from .cache import Cache
|
||||
from .key import key_creator
|
||||
from .helpers import Error, location_validator, format_time, format_file_size, \
|
||||
format_file_mode, ExcludePattern, exclude_path, adjust_patterns, to_localtime, timestamp, \
|
||||
get_cache_dir, get_keys_dir, format_timedelta, prune_within, prune_split, \
|
||||
Manifest, remove_surrogates, update_excludes, format_archive, check_extension_modules, Statistics, \
|
||||
is_cachedir, bigint_to_int
|
||||
from attic.remote import RepositoryServer, RemoteRepository
|
||||
from .remote import RepositoryServer, RemoteRepository
|
||||
|
||||
|
||||
class Archiver:
|
||||
|
@ -296,7 +296,7 @@ def do_delete(self, args):
|
|||
def do_mount(self, args):
|
||||
"""Mount archive or an entire repository as a FUSE fileystem"""
|
||||
try:
|
||||
from attic.fuse import FuseOperations
|
||||
from .fuse import FuseOperations
|
||||
except ImportError as e:
|
||||
self.print_error('loading fuse support failed [ImportError: %s]' % str(e))
|
||||
return self.exit_code
|
||||
|
@ -814,7 +814,7 @@ def sig_info_handler(signum, stack):
|
|||
"""search the stack for infos about the currently processed file and print them"""
|
||||
for frame in inspect.getouterframes(stack):
|
||||
func, loc = frame[3], frame[0].f_locals
|
||||
if func in ('process_file', '_process', ): # attic create
|
||||
if func in ('process_file', '_process', ): # create op
|
||||
path = loc['path']
|
||||
try:
|
||||
pos = loc['fd'].tell()
|
||||
|
@ -823,7 +823,7 @@ def sig_info_handler(signum, stack):
|
|||
pos, total = 0, 0
|
||||
print("{0} {1}/{2}".format(path, format_file_size(pos), format_file_size(total)))
|
||||
break
|
||||
if func in ('extract_item', ): # attic extract
|
||||
if func in ('extract_item', ): # extract op
|
||||
path = loc['item'][b'path']
|
||||
try:
|
||||
pos = loc['fd'].tell()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from configparser import RawConfigParser
|
||||
from attic.remote import cache_if_remote
|
||||
from .remote import cache_if_remote
|
||||
import msgpack
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
import stat
|
||||
import tempfile
|
||||
import time
|
||||
from attic.archive import Archive
|
||||
from attic.helpers import daemonize
|
||||
from attic.remote import cache_if_remote
|
||||
from .archive import Archive
|
||||
from .helpers import daemonize
|
||||
from .remote import cache_if_remote
|
||||
|
||||
# Does this version of llfuse support ns precision?
|
||||
have_fuse_mtime_ns = hasattr(llfuse.EntryAttributes, 'st_mtime_ns')
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
from operator import attrgetter
|
||||
import fcntl
|
||||
|
||||
import attic.hashindex
|
||||
import attic.chunker
|
||||
import attic.crypto
|
||||
from . import hashindex
|
||||
from . import chunker
|
||||
from . import crypto
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
|
@ -71,11 +71,11 @@ def release(self):
|
|||
|
||||
|
||||
def check_extension_modules():
|
||||
import attic.platform
|
||||
if (attic.hashindex.API_VERSION != 2 or
|
||||
attic.chunker.API_VERSION != 2 or
|
||||
attic.crypto.API_VERSION != 2 or
|
||||
attic.platform.API_VERSION != 2):
|
||||
from . import platform
|
||||
if (hashindex.API_VERSION != 2 or
|
||||
chunker.API_VERSION != 2 or
|
||||
crypto.API_VERSION != 2 or
|
||||
platform.API_VERSION != 2):
|
||||
raise ExtensionModuleError
|
||||
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
from hashlib import sha256
|
||||
import zlib
|
||||
|
||||
from attic.crypto import pbkdf2_sha256, get_random_bytes, AES, bytes_to_long, long_to_bytes, bytes_to_int, num_aes_blocks
|
||||
from attic.helpers import IntegrityError, get_keys_dir, Error
|
||||
from .crypto import pbkdf2_sha256, get_random_bytes, AES, bytes_to_long, long_to_bytes, bytes_to_int, num_aes_blocks
|
||||
from .helpers import IntegrityError, get_keys_dir, Error
|
||||
|
||||
PREFIX = b'\0' * 8
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import sys
|
||||
|
||||
if sys.platform.startswith('linux'):
|
||||
from attic.platform_linux import acl_get, acl_set, API_VERSION
|
||||
from .platform_linux import acl_get, acl_set, API_VERSION
|
||||
elif sys.platform.startswith('freebsd'):
|
||||
from attic.platform_freebsd import acl_get, acl_set, API_VERSION
|
||||
from .platform_freebsd import acl_get, acl_set, API_VERSION
|
||||
elif sys.platform == 'darwin':
|
||||
from attic.platform_darwin import acl_get, acl_set, API_VERSION
|
||||
from .platform_darwin import acl_get, acl_set, API_VERSION
|
||||
else:
|
||||
API_VERSION = 2
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from attic.helpers import user2uid, group2gid
|
||||
from .helpers import user2uid, group2gid
|
||||
|
||||
API_VERSION = 2
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from attic.helpers import posix_acl_use_stored_uid_gid
|
||||
from .helpers import posix_acl_use_stored_uid_gid
|
||||
|
||||
API_VERSION = 2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import re
|
||||
from stat import S_ISLNK
|
||||
from attic.helpers import posix_acl_use_stored_uid_gid, user2uid, group2gid
|
||||
from .helpers import posix_acl_use_stored_uid_gid, user2uid, group2gid
|
||||
|
||||
API_VERSION = 2
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import tempfile
|
||||
import traceback
|
||||
|
||||
from attic import __version__
|
||||
from . import __version__
|
||||
|
||||
from .hashindex import NSIndex
|
||||
from .helpers import Error, IntegrityError
|
||||
|
@ -123,7 +123,7 @@ def __init__(self, location, create=False):
|
|||
self.unpacker = msgpack.Unpacker(use_list=False)
|
||||
self.p = None
|
||||
if location.host == '__testsuite__':
|
||||
args = [sys.executable, '-m', 'attic.archiver', 'serve'] + self.extra_test_args
|
||||
args = [sys.executable, '-m', 'borg.archiver', 'serve'] + self.extra_test_args
|
||||
else:
|
||||
args = ['ssh']
|
||||
if location.port:
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
import sysconfig
|
||||
import time
|
||||
import unittest
|
||||
from attic.helpers import st_mtime_ns
|
||||
from attic.xattr import get_all
|
||||
from ..helpers import st_mtime_ns
|
||||
from ..xattr import get_all
|
||||
|
||||
try:
|
||||
import llfuse
|
||||
|
@ -113,7 +113,7 @@ class TestLoader(unittest.TestLoader):
|
|||
"""
|
||||
|
||||
def loadTestsFromName(self, pattern, module=None):
|
||||
suite = self.discover('attic.testsuite', '*.py')
|
||||
suite = self.discover('borg.testsuite', '*.py')
|
||||
tests = unittest.TestSuite()
|
||||
for test in get_tests(suite):
|
||||
if pattern.lower() in test.id().lower():
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import msgpack
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.testsuite.mock import Mock
|
||||
from attic.archive import Archive, CacheChunkBuffer, RobustUnpacker
|
||||
from attic.key import PlaintextKey
|
||||
from attic.helpers import Manifest
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import msgpack
|
||||
|
||||
from ..archive import Archive, CacheChunkBuffer, RobustUnpacker
|
||||
from ..key import PlaintextKey
|
||||
from ..helpers import Manifest
|
||||
from . import BaseTestCase
|
||||
from .mock import Mock
|
||||
|
||||
|
||||
class MockCache:
|
||||
|
||||
|
|
|
@ -10,16 +10,17 @@
|
|||
import time
|
||||
import unittest
|
||||
from hashlib import sha256
|
||||
from attic import xattr
|
||||
from attic.archive import Archive, ChunkBuffer, CHUNK_MAX
|
||||
from attic.archiver import Archiver
|
||||
from attic.cache import Cache
|
||||
from attic.crypto import bytes_to_long, num_aes_blocks
|
||||
from attic.helpers import Manifest
|
||||
from attic.remote import RemoteRepository, PathNotAllowed
|
||||
from attic.repository import Repository
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.testsuite.mock import patch
|
||||
|
||||
from .. import xattr
|
||||
from ..archive import Archive, ChunkBuffer, CHUNK_MAX
|
||||
from ..archiver import Archiver
|
||||
from ..cache import Cache
|
||||
from ..crypto import bytes_to_long, num_aes_blocks
|
||||
from ..helpers import Manifest
|
||||
from ..remote import RemoteRepository, PathNotAllowed
|
||||
from ..repository import Repository
|
||||
from . import BaseTestCase
|
||||
from .mock import patch
|
||||
|
||||
try:
|
||||
import llfuse
|
||||
|
@ -95,7 +96,7 @@ def cmd(self, *args, **kw):
|
|||
fork = kw.get('fork', False)
|
||||
if fork:
|
||||
try:
|
||||
output = subprocess.check_output((sys.executable, '-m', 'attic.archiver') + args)
|
||||
output = subprocess.check_output((sys.executable, '-m', 'borg.archiver') + args)
|
||||
ret = 0
|
||||
except subprocess.CalledProcessError as e:
|
||||
output = e.output
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
from attic.chunker import Chunker, buzhash, buzhash_update
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.archive import CHUNK_MAX
|
||||
from io import BytesIO
|
||||
|
||||
from ..chunker import Chunker, buzhash, buzhash_update
|
||||
from ..archive import CHUNK_MAX
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class ChunkerTestCase(BaseTestCase):
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from binascii import hexlify
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.crypto import AES, bytes_to_long, bytes_to_int, long_to_bytes, pbkdf2_sha256, get_random_bytes
|
||||
|
||||
from ..crypto import AES, bytes_to_long, bytes_to_int, long_to_bytes, pbkdf2_sha256, get_random_bytes
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class CryptoTestCase(BaseTestCase):
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import hashlib
|
||||
import os
|
||||
import tempfile
|
||||
from attic.hashindex import NSIndex, ChunkIndex
|
||||
from attic.testsuite import BaseTestCase
|
||||
|
||||
from ..hashindex import NSIndex, ChunkIndex
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class HashIndexTestCase(BaseTestCase):
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
import os
|
||||
import tempfile
|
||||
import unittest
|
||||
from attic.helpers import adjust_patterns, exclude_path, Location, format_timedelta, IncludePattern, ExcludePattern, make_path_safe, UpgradableLock, prune_within, prune_split, to_localtime, \
|
||||
StableDict, int_to_bigint, bigint_to_int, parse_timestamp
|
||||
from attic.testsuite import BaseTestCase
|
||||
|
||||
import msgpack
|
||||
|
||||
from ..helpers import adjust_patterns, exclude_path, Location, format_timedelta, IncludePattern, ExcludePattern, make_path_safe, UpgradableLock, prune_within, prune_split, to_localtime, \
|
||||
StableDict, int_to_bigint, bigint_to_int, parse_timestamp
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class BigIntTestCase(BaseTestCase):
|
||||
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
import shutil
|
||||
import tempfile
|
||||
from binascii import hexlify
|
||||
from attic.crypto import bytes_to_long, num_aes_blocks
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.key import PlaintextKey, PassphraseKey, KeyfileKey
|
||||
from attic.helpers import Location, unhexlify
|
||||
|
||||
from ..crypto import bytes_to_long, num_aes_blocks
|
||||
from ..key import PlaintextKey, PassphraseKey, KeyfileKey
|
||||
from ..helpers import Location, unhexlify
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class KeyTestCase(BaseTestCase):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from attic.lrucache import LRUCache
|
||||
from attic.testsuite import BaseTestCase
|
||||
from ..lrucache import LRUCache
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
class LRUCacheTestCase(BaseTestCase):
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from attic.platform import acl_get, acl_set
|
||||
from attic.testsuite import BaseTestCase
|
||||
|
||||
from ..platform import acl_get, acl_set
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
ACCESS_ACL = """
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from attic.testsuite.mock import patch
|
||||
from attic.hashindex import NSIndex
|
||||
from attic.helpers import Location, IntegrityError, UpgradableLock
|
||||
from attic.remote import RemoteRepository, InvalidRPCMethod
|
||||
from attic.repository import Repository
|
||||
from attic.testsuite import BaseTestCase
|
||||
|
||||
from ..hashindex import NSIndex
|
||||
from ..helpers import Location, IntegrityError, UpgradableLock
|
||||
from ..remote import RemoteRepository, InvalidRPCMethod
|
||||
from ..repository import Repository
|
||||
from . import BaseTestCase
|
||||
from .mock import patch
|
||||
|
||||
|
||||
class RepositoryTestCaseBase(BaseTestCase):
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import unittest
|
||||
from attic.testsuite import TestLoader
|
||||
|
||||
from . import TestLoader
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
import tempfile
|
||||
import unittest
|
||||
from attic.testsuite import BaseTestCase
|
||||
from attic.xattr import is_enabled, getxattr, setxattr, listxattr
|
||||
|
||||
from ..xattr import is_enabled, getxattr, setxattr, listxattr
|
||||
from . import BaseTestCase
|
||||
|
||||
|
||||
@unittest.skipUnless(is_enabled(), 'xattr not enabled on filesystem')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sat Sep 10 18:18:25 2011.
|
||||
|
@ -11,7 +11,8 @@
|
|||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os, attic
|
||||
import sys, os
|
||||
from borg import __version__ as sw_version
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
@ -48,7 +49,7 @@
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = attic.__version__.split('-')[0]
|
||||
version = sw_version.split('-')[0]
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
from attic.archiver import main
|
||||
from borg.archiver import main
|
||||
main()
|
||||
|
||||
|
|
45
setup.py
45
setup.py
|
@ -6,8 +6,8 @@
|
|||
import versioneer
|
||||
versioneer.VCS = 'git'
|
||||
versioneer.style = 'pep440'
|
||||
versioneer.versionfile_source = 'attic/_version.py'
|
||||
versioneer.versionfile_build = 'attic/_version.py'
|
||||
versioneer.versionfile_source = 'borg/_version.py'
|
||||
versioneer.versionfile_build = 'borg/_version.py'
|
||||
versioneer.tag_prefix = ''
|
||||
versioneer.parentdir_prefix = 'borgbackup-' # dirname like 'myproject-1.2.0'
|
||||
|
||||
|
@ -21,12 +21,12 @@
|
|||
except ImportError:
|
||||
from distutils.core import setup, Extension
|
||||
|
||||
crypto_source = 'attic/crypto.pyx'
|
||||
chunker_source = 'attic/chunker.pyx'
|
||||
hashindex_source = 'attic/hashindex.pyx'
|
||||
platform_linux_source = 'attic/platform_linux.pyx'
|
||||
platform_darwin_source = 'attic/platform_darwin.pyx'
|
||||
platform_freebsd_source = 'attic/platform_freebsd.pyx'
|
||||
crypto_source = 'borg/crypto.pyx'
|
||||
chunker_source = 'borg/chunker.pyx'
|
||||
hashindex_source = 'borg/hashindex.pyx'
|
||||
platform_linux_source = 'borg/platform_linux.pyx'
|
||||
platform_darwin_source = 'borg/platform_darwin.pyx'
|
||||
platform_freebsd_source = 'borg/platform_freebsd.pyx'
|
||||
|
||||
try:
|
||||
from Cython.Distutils import build_ext
|
||||
|
@ -34,13 +34,20 @@
|
|||
|
||||
class Sdist(versioneer.cmd_sdist):
|
||||
def __init__(self, *args, **kwargs):
|
||||
for src in glob('attic/*.pyx'):
|
||||
cython_compiler.compile(glob('attic/*.pyx'),
|
||||
for src in glob('borg/*.pyx'):
|
||||
cython_compiler.compile(glob('borg/*.pyx'),
|
||||
cython_compiler.default_options)
|
||||
versioneer.cmd_sdist.__init__(self, *args, **kwargs)
|
||||
|
||||
def make_distribution(self):
|
||||
self.filelist.extend(['attic/crypto.c', 'attic/chunker.c', 'attic/_chunker.c', 'attic/hashindex.c', 'attic/_hashindex.c', 'attic/platform_linux.c', 'attic/platform_freebsd.c', 'attic/platform_darwin.c'])
|
||||
self.filelist.extend([
|
||||
'borg/crypto.c',
|
||||
'borg/chunker.c', 'borg/_chunker.c',
|
||||
'borg/hashindex.c', 'borg/_hashindex.c',
|
||||
'borg/platform_linux.c',
|
||||
'borg/platform_freebsd.c',
|
||||
'borg/platform_darwin.c',
|
||||
])
|
||||
super(Sdist, self).make_distribution()
|
||||
|
||||
except ImportError:
|
||||
|
@ -68,7 +75,7 @@ def detect_openssl(prefixes):
|
|||
return prefix
|
||||
|
||||
|
||||
possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/attic', '/opt/local']
|
||||
possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local']
|
||||
if os.environ.get('BORG_OPENSSL_PREFIX'):
|
||||
possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX'))
|
||||
ssl_prefix = detect_openssl(possible_openssl_prefixes)
|
||||
|
@ -85,16 +92,16 @@ def detect_openssl(prefixes):
|
|||
cmdclass.update({'build_ext': build_ext, 'sdist': Sdist})
|
||||
|
||||
ext_modules = [
|
||||
Extension('attic.crypto', [crypto_source], libraries=['crypto'], include_dirs=include_dirs, library_dirs=library_dirs),
|
||||
Extension('attic.chunker', [chunker_source]),
|
||||
Extension('attic.hashindex', [hashindex_source])
|
||||
Extension('borg.crypto', [crypto_source], libraries=['crypto'], include_dirs=include_dirs, library_dirs=library_dirs),
|
||||
Extension('borg.chunker', [chunker_source]),
|
||||
Extension('borg.hashindex', [hashindex_source])
|
||||
]
|
||||
if sys.platform.startswith('linux'):
|
||||
ext_modules.append(Extension('attic.platform_linux', [platform_linux_source], libraries=['acl']))
|
||||
ext_modules.append(Extension('borg.platform_linux', [platform_linux_source], libraries=['acl']))
|
||||
elif sys.platform.startswith('freebsd'):
|
||||
ext_modules.append(Extension('attic.platform_freebsd', [platform_freebsd_source]))
|
||||
ext_modules.append(Extension('borg.platform_freebsd', [platform_freebsd_source]))
|
||||
elif sys.platform == 'darwin':
|
||||
ext_modules.append(Extension('attic.platform_darwin', [platform_darwin_source]))
|
||||
ext_modules.append(Extension('borg.platform_darwin', [platform_darwin_source]))
|
||||
|
||||
setup(
|
||||
name='borgbackup',
|
||||
|
@ -122,7 +129,7 @@ def detect_openssl(prefixes):
|
|||
'Topic :: Security :: Cryptography',
|
||||
'Topic :: System :: Archiving :: Backup',
|
||||
],
|
||||
packages=['attic', 'attic.testsuite'],
|
||||
packages=['borg', 'borg.testsuite'],
|
||||
scripts=['scripts/borg'],
|
||||
cmdclass=cmdclass,
|
||||
ext_modules=ext_modules,
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -4,7 +4,7 @@ envlist = py32, py33, py34
|
|||
[testenv]
|
||||
# Change dir to avoid import problem
|
||||
changedir = docs
|
||||
commands = {envpython} -m attic.testsuite.run -bv []
|
||||
commands = {envpython} -m borg.testsuite.run -bv []
|
||||
|
||||
[testenv:py32]
|
||||
deps = mock
|
||||
|
|
Loading…
Reference in a new issue