diff options
Diffstat (limited to 'rdiff-backup/dist/setup.py')
-rwxr-xr-x | rdiff-backup/dist/setup.py | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py index 934e0a6..7c9892d 100755 --- a/rdiff-backup/dist/setup.py +++ b/rdiff-backup/dist/setup.py @@ -3,17 +3,12 @@ import sys, os, getopt from distutils.core import setup, Extension -version_string = "0.9.0" +version_string = "$version" if sys.version_info[:2] < (2,2): print "Sorry, rdiff-backup requires version 2.2 or later of python" sys.exit(1) -def install(cmd): - if os.system("install " + cmd) != 0: - print "Error running 'install %s'" % cmd - sys.exit(1) - setup(name="rdiff-backup", version=version_string, description="Local/remote mirroring+incremental backup", @@ -21,27 +16,11 @@ setup(name="rdiff-backup", author_email="bescoto@stanford.edu", url="http://rdiff-backup.stanford.edu", packages = ['rdiff_backup'], - ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])]) - -copy_files = 0 -prefix = "/usr" -for arg in sys.argv[1:]: # check for "install" and --prefix= arg - if arg == "install": copy_files = 1 - elif arg.startswith("--prefix="): prefix = arg[len("--prefix="):] - -if copy_files: - bindir = prefix + "/bin" - print "Copying rdiff-backup to " + bindir - install("-d " + bindir) - install("-m0755 rdiff-backup " + bindir) + ext_modules = [Extension("rdiff_backup.C", ["cmodule.c"])], + scripts = ['rdiff-backup'], + data_files = [('share/man/man1', ['rdiff-backup.1']), + ('share/doc/rdiff-backup-%s' % version_string, + ['CHANGELOG', 'COPYING', 'README', 'FAQ.html'])]) - mandir = prefix + "/share/man/man1" - print "Copying rdiff-backup.1 to " + mandir - install("-d " + mandir) - install("-m0644 rdiff-backup.1 " + mandir) - docdir = "%s/share/doc/rdiff-backup-%s" % (prefix, version_string) - print ("Copying CHANGELOG, COPYING, README, and FAQ.html to " + docdir) - install("-d " + docdir) - install("-m0644 CHANGELOG COPYING README FAQ.html " + docdir) |