summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--.travis.yml2
-rw-r--r--MANIFEST.in4
-rw-r--r--borg/_version.py2
-rw-r--r--borg/archive.py14
-rw-r--r--borg/archiver.py20
-rw-r--r--borg/cache.py2
-rw-r--r--borg/fuse.py6
-rw-r--r--borg/helpers.py16
-rw-r--r--borg/key.py4
-rw-r--r--borg/platform.py6
-rw-r--r--borg/platform_darwin.pyx2
-rw-r--r--borg/platform_freebsd.pyx2
-rw-r--r--borg/platform_linux.pyx2
-rw-r--r--borg/remote.py4
-rw-r--r--borg/testsuite/__init__.py6
-rw-r--r--borg/testsuite/archive.py14
-rw-r--r--borg/testsuite/archiver.py23
-rw-r--r--borg/testsuite/chunker.py7
-rw-r--r--borg/testsuite/crypto.py5
-rw-r--r--borg/testsuite/hashindex.py5
-rw-r--r--borg/testsuite/helpers.py8
-rw-r--r--borg/testsuite/key.py9
-rw-r--r--borg/testsuite/lrucache.py4
-rw-r--r--borg/testsuite/platform.py5
-rw-r--r--borg/testsuite/repository.py13
-rw-r--r--borg/testsuite/run.py3
-rw-r--r--borg/testsuite/xattr.py5
-rw-r--r--docs/conf.py7
-rw-r--r--scripts/borg2
-rw-r--r--setup.py45
-rw-r--r--tox.ini2
32 files changed, 136 insertions, 115 deletions
diff --git a/.gitattributes b/.gitattributes
index fb24ad887..a97e72971 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-attic/_version.py export-subst
+borg/_version.py export-subst
diff --git a/.travis.yml b/.travis.yml
index 7e3471b11..367458353 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/MANIFEST.in b/MANIFEST.in
index 7584a33c2..9ac968909 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -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
diff --git a/borg/_version.py b/borg/_version.py
index a7103c1a6..7a94d800f 100644
--- a/borg/_version.py
+++ b/borg/_version.py
@@ -21,7 +21,7 @@ git_full = "$Format:%H$"
# 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):
diff --git a/borg/archive.py b/borg/archive.py
index bae659ea2..a2cc59b99 100644
--- a/borg/archive.py
+++ b/borg/archive.py
@@ -4,8 +4,8 @@ from itertools import groupby
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 stat
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
diff --git a/borg/archiver.py b/borg/archiver.py
index b9295e87e..79bf65f03 100644
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -12,17 +12,17 @@ import sys
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 @@ Type "Yes I am sure" if you understand this and want to continue.\n""")
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()
diff --git a/borg/cache.py b/borg/cache.py
index 97890b52a..037a8e76b 100644
--- a/borg/cache.py
+++ b/borg/cache.py
@@ -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
diff --git a/borg/fuse.py b/borg/fuse.py
index 1e93eb951..eb4b46ffd 100644
--- a/borg/fuse.py
+++ b/borg/fuse.py
@@ -7,9 +7,9 @@ import os
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')
diff --git a/borg/helpers.py b/borg/helpers.py
index 0ba0739f9..f96c1bf52 100644
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -12,9 +12,9 @@ from fnmatch import translate
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 @@ class UpgradableLock:
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
diff --git a/borg/key.py b/borg/key.py
index f61798b9b..3e44b092e 100644
--- a/borg/key.py
+++ b/borg/key.py
@@ -7,8 +7,8 @@ import hmac
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
diff --git a/borg/platform.py b/borg/platform.py
index 19f8072e6..caa3b4edc 100644
--- a/borg/platform.py
+++ b/borg/platform.py
@@ -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
diff --git a/borg/platform_darwin.pyx b/borg/platform_darwin.pyx
index 37ed2d461..e44dc8ef2 100644
--- a/borg/platform_darwin.pyx
+++ b/borg/platform_darwin.pyx
@@ -1,5 +1,5 @@
import os
-from attic.helpers import user2uid, group2gid
+from .helpers import user2uid, group2gid
API_VERSION = 2
diff --git a/borg/platform_freebsd.pyx b/borg/platform_freebsd.pyx
index 074eebca1..43ae35edc 100644
--- a/borg/platform_freebsd.pyx
+++ b/borg/platform_freebsd.pyx
@@ -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
diff --git a/borg/platform_linux.pyx b/borg/platform_linux.pyx
index 658d77a48..6144c76ff 100644
--- a/borg/platform_linux.pyx
+++ b/borg/platform_linux.pyx
@@ -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
diff --git a/borg/remote.py b/borg/remote.py
index b6b746d85..5d59e14ac 100644
--- a/borg/remote.py
+++ b/borg/remote.py
@@ -9,7 +9,7 @@ import sys
import tempfile
import traceback
-from attic import __version__
+from . import __version__
from .hashindex import NSIndex
from .helpers import Error, IntegrityError
@@ -123,7 +123,7 @@ class RemoteRepository:
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:
diff --git a/borg/testsuite/__init__.py b/borg/testsuite/__init__.py
index 421a0c329..fac3de9e2 100644
--- a/borg/testsuite/__init__.py
+++ b/borg/testsuite/__init__.py
@@ -6,8 +6,8 @@ import sys
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():
diff --git a/borg/testsuite/archive.py b/borg/testsuite/archive.py
index 1d9b7004d..abb5bccb9 100644
--- a/borg/testsuite/archive.py
+++ b/borg/testsuite/archive.py
@@ -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:
diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py
index 85de28cd3..11efefd3d 100644
--- a/borg/testsuite/archiver.py
+++ b/borg/testsuite/archiver.py
@@ -10,16 +10,17 @@ import tempfile
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 @@ class ArchiverTestCaseBase(BaseTestCase):
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
diff --git a/borg/testsuite/chunker.py b/borg/testsuite/chunker.py
index cb5bb55ec..982e4dd20 100644
--- a/borg/testsuite/chunker.py
+++ b/borg/testsuite/chunker.py
@@ -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):
diff --git a/borg/testsuite/crypto.py b/borg/testsuite/crypto.py
index 066ba1815..e438eb85e 100644
--- a/borg/testsuite/crypto.py
+++ b/borg/testsuite/crypto.py
@@ -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):
diff --git a/borg/testsuite/hashindex.py b/borg/testsuite/hashindex.py
index de2a3eaae..41c019d61 100644
--- a/borg/testsuite/hashindex.py
+++ b/borg/testsuite/hashindex.py
@@ -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):
diff --git a/borg/testsuite/helpers.py b/borg/testsuite/helpers.py
index 23c604f43..ac949ba7a 100644
--- a/borg/testsuite/helpers.py
+++ b/borg/testsuite/helpers.py
@@ -4,11 +4,13 @@ from datetime import datetime, timezone, timedelta
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):
diff --git a/borg/testsuite/key.py b/borg/testsuite/key.py
index 32ac64974..2f234dd8a 100644
--- a/borg/testsuite/key.py
+++ b/borg/testsuite/key.py
@@ -3,10 +3,11 @@ import re
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):
diff --git a/borg/testsuite/lrucache.py b/borg/testsuite/lrucache.py
index 83d23cfc5..43ea5572e 100644
--- a/borg/testsuite/lrucache.py
+++ b/borg/testsuite/lrucache.py
@@ -1,5 +1,5 @@
-from attic.lrucache import LRUCache
-from attic.testsuite import BaseTestCase
+from ..lrucache import LRUCache
+from . import BaseTestCase
class LRUCacheTestCase(BaseTestCase):
diff --git a/borg/testsuite/platform.py b/borg/testsuite/platform.py
index bb3ab32b7..2a9ebff9e 100644
--- a/borg/testsuite/platform.py
+++ b/borg/testsuite/platform.py
@@ -3,8 +3,9 @@ import shutil
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 = """
diff --git a/borg/testsuite/repository.py b/borg/testsuite/repository.py
index 7be454e5b..9cc8d2427 100644
--- a/borg/testsuite/repository.py
+++ b/borg/testsuite/repository.py
@@ -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):
diff --git a/borg/testsuite/run.py b/borg/testsuite/run.py
index 9231d3677..19d87699b 100644
--- a/borg/testsuite/run.py
+++ b/borg/testsuite/run.py
@@ -1,5 +1,6 @@
import unittest
-from attic.testsuite import TestLoader
+
+from . import TestLoader
def main():
diff --git a/borg/testsuite/xattr.py b/borg/testsuite/xattr.py
index 952b70d80..d73856953 100644
--- a/borg/testsuite/xattr.py
+++ b/borg/testsuite/xattr.py
@@ -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')
diff --git a/docs/conf.py b/docs/conf.py
index d7f29e69e..d51da9207 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -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 @@ copyright = '2010-2014, Jonas Borgström'
# 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
diff --git a/scripts/borg b/scripts/borg
index 01ace036e..9fe6f7b5a 100644
--- a/scripts/borg
+++ b/scripts/borg
@@ -1,4 +1,4 @@
#!/usr/bin/env python
-from attic.archiver import main
+from borg.archiver import main
main()
diff --git a/setup.py b/setup.py
index 1e4686dba..d5d548b3d 100644
--- a/setup.py
+++ b/setup.py
@@ -6,8 +6,8 @@ from glob import glob
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 @@ try:
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 @@ try:
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 @@ cmdclass = versioneer.get_cmdclass()
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 @@ setup(
'Topic :: Security :: Cryptography',
'Topic :: System :: Archiving :: Backup',
],
- packages=['attic', 'attic.testsuite'],
+ packages=['borg', 'borg.testsuite'],
scripts=['scripts/borg'],
cmdclass=cmdclass,
ext_modules=ext_modules,
diff --git a/tox.ini b/tox.ini
index 327ddf0c1..1a71053c4 100644
--- a/tox.ini
+++ b/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