|
@@ -25,6 +25,7 @@ crypto_source = 'attic/crypto.pyx'
|
|
chunker_source = 'attic/chunker.pyx'
|
|
chunker_source = 'attic/chunker.pyx'
|
|
hashindex_source = 'attic/hashindex.pyx'
|
|
hashindex_source = 'attic/hashindex.pyx'
|
|
platform_linux_source = 'attic/platform_linux.pyx'
|
|
platform_linux_source = 'attic/platform_linux.pyx'
|
|
|
|
+platform_freebsd_source = 'attic/platform_freebsd.pyx'
|
|
|
|
|
|
try:
|
|
try:
|
|
from Cython.Distutils import build_ext
|
|
from Cython.Distutils import build_ext
|
|
@@ -38,7 +39,7 @@ try:
|
|
versioneer.cmd_sdist.__init__(self, *args, **kwargs)
|
|
versioneer.cmd_sdist.__init__(self, *args, **kwargs)
|
|
|
|
|
|
def make_distribution(self):
|
|
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'])
|
|
|
|
|
|
+ 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'])
|
|
super(Sdist, self).make_distribution()
|
|
super(Sdist, self).make_distribution()
|
|
|
|
|
|
except ImportError:
|
|
except ImportError:
|
|
@@ -49,9 +50,10 @@ except ImportError:
|
|
crypto_source = crypto_source.replace('.pyx', '.c')
|
|
crypto_source = crypto_source.replace('.pyx', '.c')
|
|
chunker_source = chunker_source.replace('.pyx', '.c')
|
|
chunker_source = chunker_source.replace('.pyx', '.c')
|
|
hashindex_source = hashindex_source.replace('.pyx', '.c')
|
|
hashindex_source = hashindex_source.replace('.pyx', '.c')
|
|
- acl_source = platform_linux_source.replace('.pyx', '.c')
|
|
|
|
|
|
+ platform_linux_source = platform_linux_source.replace('.pyx', '.c')
|
|
|
|
+ platform_freebsd_source = platform_freebsd_source.replace('.pyx', '.c')
|
|
from distutils.command.build_ext import build_ext
|
|
from distutils.command.build_ext import build_ext
|
|
- if not all(os.path.exists(path) for path in [crypto_source, chunker_source, hashindex_source, acl_source]):
|
|
|
|
|
|
+ if not all(os.path.exists(path) for path in [crypto_source, chunker_source, hashindex_source, platform_linux_source, platform_freebsd_source]):
|
|
raise ImportError('The GIT version of Attic needs Cython. Install Cython or use a released version')
|
|
raise ImportError('The GIT version of Attic needs Cython. Install Cython or use a released version')
|
|
|
|
|
|
|
|
|
|
@@ -87,11 +89,13 @@ ext_modules = [
|
|
]
|
|
]
|
|
if platform == 'Linux':
|
|
if platform == 'Linux':
|
|
ext_modules.append(Extension('attic.platform_linux', [platform_linux_source], libraries=['acl']))
|
|
ext_modules.append(Extension('attic.platform_linux', [platform_linux_source], libraries=['acl']))
|
|
|
|
+elif platform == 'FreeBSD':
|
|
|
|
+ ext_modules.append(Extension('attic.platform_freebsd', [platform_freebsd_source]))
|
|
|
|
|
|
setup(
|
|
setup(
|
|
name='Attic',
|
|
name='Attic',
|
|
version=versioneer.get_version(),
|
|
version=versioneer.get_version(),
|
|
- author='Jonas Borgström',
|
|
|
|
|
|
+ author='Jonas Borgstrom',
|
|
author_email='jonas@borgstrom.se',
|
|
author_email='jonas@borgstrom.se',
|
|
url='https://attic-backup.org/',
|
|
url='https://attic-backup.org/',
|
|
description='Deduplicated backups',
|
|
description='Deduplicated backups',
|