diff options
-rwxr-xr-x | rdiff-backup/dist/makedist | 23 | ||||
-rwxr-xr-x | rdiff-backup/dist/setup.py | 18 |
2 files changed, 36 insertions, 5 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist index 89dd241..bba7d23 100755 --- a/rdiff-backup/dist/makedist +++ b/rdiff-backup/dist/makedist @@ -3,6 +3,7 @@ import os, re, shutil, time SourceDir = "src" +DistDir = "dist" filelist = [SourceDir + "/rdiff-backup", "CHANGELOG", "COPYING", "README", "FAQ.html"] @@ -14,11 +15,27 @@ redhat_spec_template = "dist/rdiff-backup.rh7x.spec" def GetVersion(): """Return version string by reading in ./rdiff-backup""" - fp = open(SourceDir + "/rdiff-backup", "r") + fp = open("rdiff-backup", "r") match = re.search("Version (.*?) ", fp.read()) fp.close() return match.group(1) +def CopyModule(): + """Copy all the relevant module source files to rdiff_backup""" + moddir = DistDir+"/rdiff_backup" + os.system("rm -rf %s" % moddir) + os.mkdir(moddir) + + for filename in ["cmodule.c", "connection.py", "destructive_stepping.py", + "FilenameMapping.py", "Globals.py", "Hardlink.py", + "highlevel.py", "increment.py", "__init__.py", + "iterfile.py", "lazy.py", "log.py", "Main.py", + "manage.py", "MiscStats.py", "Rdiff.py", "restore.py", + "rlist.py", "robust.py", "rorpiter.py", "rpath.py", + "seleciton.py", "SetConnections.py", "static.py", + "statistics.py", "Time.py"]: + assert not os.system("cp %s/%s %s" % (SourceDir, filename, moddir)) + def CopyMan(destination, version): """Create updated man page at the specified location""" fp = open(destination, "w") @@ -101,10 +118,6 @@ def MakeSpecFile(version): return (specfile, redhat_specfile) def Main(): - cwd = os.getcwd() - os.chdir(SourceDir) - assert not os.system("./Make") - os.chdir(cwd) version = GetVersion() print "Making FAQ" MakeFAQ() diff --git a/rdiff-backup/dist/setup.py b/rdiff-backup/dist/setup.py new file mode 100755 index 0000000..72f63c6 --- /dev/null +++ b/rdiff-backup/dist/setup.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +import sys +from distutils.core import setup, Extension + +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", + description="Local/remote mirroring+incremental backup", + author="Ben Escoto", + author_email="bescoto@stanford.edu", + url="http://rdiff-backup.stanford.edu", + packages = ['rdiff_backup'], + ext_modules=[Extension("rdiff_backup.C", ["cmodule.c"])]) + |