1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#!/usr/bin/env python
import sys, os, getopt
from distutils.core import setup, Extension
version_string = "0.4.12"
if sys.version_info[:2] < (2,3):
print "Sorry, duplicity requires version 2.3 or later of python"
sys.exit(1)
try:
import pexpect
pexpect_version = pexpect.__version__
except ImportError:
pexpect_version = None
if not pexpect_version or pexpect_version < "2.1":
print ("Warning: pexpect version 2.1 or greater is required for the ssh backend.\n"
" If you do not plan to use the ssh backend, this is not a problem.")
incdir_list = libdir_list = None
if os.name == 'posix':
LIBRSYNC_DIR = os.environ.get('LIBRSYNC_DIR', '')
args = sys.argv[:]
for arg in args:
if arg.startswith('--librsync-dir='):
LIBRSYNC_DIR = arg.split('=')[1]
sys.argv.remove(arg)
if LIBRSYNC_DIR:
incdir_list = [os.path.join(LIBRSYNC_DIR, 'include')]
libdir_list = [os.path.join(LIBRSYNC_DIR, 'lib')]
setup(name="duplicity",
version=version_string,
description="Encrypted backup using rsync algorithm",
author="Ben Escoto",
author_email="bescoto@stanford.edu",
maintainer="Kenneth Loafman",
maintainer_email="kenneth@loafman.com",
url="http://duplicity.nongnu.org/index.html",
packages = ['duplicity'],
package_dir = {"duplicity": "src"},
ext_modules = [Extension("duplicity._librsync",
["_librsyncmodule.c"],
include_dirs=incdir_list,
library_dirs=libdir_list,
libraries=["rsync"])],
scripts = ['rdiffdir', 'duplicity'],
data_files = [('share/man/man1', ['duplicity.1', 'rdiffdir.1']),
('share/doc/duplicity-%s' % version_string,
['COPYING', 'README', 'CHANGELOG'])])
|