diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-17 07:59:31 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-06-17 07:59:31 +0000 |
commit | 9e4b8b40f80eef0a785ed73d95c99cfd54478fd8 (patch) | |
tree | 8060549a32213ab0f023d18358868d040fcc8219 /rdiff-backup/dist/setup.py | |
parent | b4df2b8231ea724cb208d26eced159c7ddb4e0c2 (diff) | |
download | rdiff-backup-9e4b8b40f80eef0a785ed73d95c99cfd54478fd8.tar.gz |
Distribution changes for new exploded format
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@137 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/dist/setup.py')
-rwxr-xr-x | rdiff-backup/dist/setup.py | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py index 72f63c6..49829bd 100755 --- a/rdiff-backup/dist/setup.py +++ b/rdiff-backup/dist/setup.py @@ -1,14 +1,17 @@ #!/usr/bin/env python -import sys +import sys, os, getopt from distutils.core import setup, Extension +version_string = "0.9.0" + if sys.version_info[:2] < (2,2): print "Sorry, rdiff-backup requires version 2.2 or later of python" sys.exit(1) + setup(name="rdiff-backup", - version="0.9.0", + version=version_string, description="Local/remote mirroring+incremental backup", author="Ben Escoto", author_email="bescoto@stanford.edu", @@ -16,3 +19,24 @@ setup(name="rdiff-backup", packages = ['rdiff_backup'], ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])]) +install = 0 +prefix = "/usr" +for arg in sys.argv[1:]: # check for "install" and --prefix arg + if arg == "install": install = 1 + elif arg.startswith("--prefix="): + prefix = arg[len("--prefix="):] + +if install: + print "Copying rdiff-backup to %s/bin" % prefix + assert not os.system("install -D -m0755 rdiff-backup " + "%s/bin/rdiff-backup" % prefix) + print "Copying rdiff-backup.1 to %s/share/man/man1" % prefix + assert not os.system("install -D -m0644 rdiff-backup.1 " + "%s/share/man/man1/rdiff-backup" % prefix) + print ("Copying CHANGELOG, COPYING, README, and FAQ.html to " + "%s/share/doc/rdiff-backup-%s" % (prefix, version_string)) + assert not os.system("install -d %s/share/doc/rdiff-backup-%s" % + (prefix, version_string)) + assert not os.system("install -m0644 CHANGELOG COPYING README FAQ.html " + "%s/share/doc/rdiff-backup-%s" % + (prefix, version_string)) |