Commit bb870818 authored by ben's avatar ben

Will use the new distutils format


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@133 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 421daa2b
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import os, re, shutil, time import os, re, shutil, time
SourceDir = "src" SourceDir = "src"
DistDir = "dist"
filelist = [SourceDir + "/rdiff-backup", "CHANGELOG", filelist = [SourceDir + "/rdiff-backup", "CHANGELOG",
"COPYING", "README", "FAQ.html"] "COPYING", "README", "FAQ.html"]
...@@ -14,11 +15,27 @@ redhat_spec_template = "dist/rdiff-backup.rh7x.spec" ...@@ -14,11 +15,27 @@ redhat_spec_template = "dist/rdiff-backup.rh7x.spec"
def GetVersion(): def GetVersion():
"""Return version string by reading in ./rdiff-backup""" """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()) match = re.search("Version (.*?) ", fp.read())
fp.close() fp.close()
return match.group(1) 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): def CopyMan(destination, version):
"""Create updated man page at the specified location""" """Create updated man page at the specified location"""
fp = open(destination, "w") fp = open(destination, "w")
...@@ -101,10 +118,6 @@ def MakeSpecFile(version): ...@@ -101,10 +118,6 @@ def MakeSpecFile(version):
return (specfile, redhat_specfile) return (specfile, redhat_specfile)
def Main(): def Main():
cwd = os.getcwd()
os.chdir(SourceDir)
assert not os.system("./Make")
os.chdir(cwd)
version = GetVersion() version = GetVersion()
print "Making FAQ" print "Making FAQ"
MakeFAQ() MakeFAQ()
......
#!/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"])])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment