diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-07-11 16:40:59 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-07-11 16:40:59 +0000 |
commit | eeee83920af9ad5b423bd8f6cb6731394bbb28f2 (patch) | |
tree | 029560a4e99926089caffb1106c806d3098664f6 /rdiff-backup/dist | |
parent | a09b3da119ee795d91436049bf0c75701d07aaa7 (diff) | |
download | rdiff-backup-eeee83920af9ad5b423bd8f6cb6731394bbb28f2.tar.gz |
Allow rdiff-backup to be built into a single executable on Windows using
py2exe ("setup.py py2exe --single-file"). (Patch from Josh Nisly)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@910 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/dist')
-rwxr-xr-x | rdiff-backup/dist/setup.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py index f0682e3..3a011ee 100755 --- a/rdiff-backup/dist/setup.py +++ b/rdiff-backup/dist/setup.py @@ -13,6 +13,7 @@ if sys.version_info[:2] < (2,2): lflags_arg = [] libname = ['rsync'] incdir_list = libdir_list = None +extra_options = {} if os.name == 'posix' or os.name == 'nt': LIBRSYNC_DIR = os.environ.get('LIBRSYNC_DIR', '') @@ -40,6 +41,21 @@ if os.name == 'posix' or os.name == 'nt': libdir_list = [os.path.join(LIBRSYNC_DIR, 'lib')] if '-lrsync' in LIBS: libname = [] + if os.name == 'nt': + try: + import py2exe + except ImportError: + pass + else: + extra_options = { + 'console': ['rdiff-backup'], + } + if '--single-file' in sys.argv[1:]: + sys.argv.remove('--single-file') + extra_options.update({ + 'options': {'py2exe': {'bundle_files': 1}}, + 'zipfile': None + }) setup(name="rdiff-backup", version=version_string, @@ -59,5 +75,6 @@ setup(name="rdiff-backup", data_files = [('share/man/man1', ['rdiff-backup.1', 'rdiff-backup-statistics.1']), ('share/doc/rdiff-backup-%s' % (version_string,), - ['CHANGELOG', 'COPYING', 'README', 'FAQ.html'])]) + ['CHANGELOG', 'COPYING', 'README', 'FAQ.html'])], + **extra_options) |