summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-07-11 16:40:59 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-07-11 16:40:59 +0000
commiteeee83920af9ad5b423bd8f6cb6731394bbb28f2 (patch)
tree029560a4e99926089caffb1106c806d3098664f6
parenta09b3da119ee795d91436049bf0c75701d07aaa7 (diff)
downloadrdiff-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
-rw-r--r--rdiff-backup/CHANGELOG3
-rwxr-xr-xrdiff-backup/dist/setup.py19
2 files changed, 21 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 975a975..da71319 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.17 (????/??/??)
---------------------------
+Allow rdiff-backup to be built into a single executable on Windows using
+py2exe ("setup.py py2exe --single-file"). (Patch from Josh Nisly)
+
Properly handle uid/gid comparison when the metadata about a destination
file has become corrupt. Closes Debian bug #410586. (Andrew Ferguson)
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)