]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup.py use sys.executable instead of hard-coded 'python' to run make-version.py
authorBrian Warner <warner@allmydata.com>
Mon, 24 Sep 2007 19:38:59 +0000 (12:38 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 24 Sep 2007 19:38:59 +0000 (12:38 -0700)
setup.py

index 33b52c2349f00d8555d8d97a4618305418e0e692..c8c2ed6fcd23e559e3cdee1d2194fb7089a7683d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -65,9 +65,15 @@ trove_classifiers=[
     ]
 
 
+# Build _version.py before trying to extract a version from it. If we aren't
+# running from a darcs checkout, this will leave any pre-existing _version.py
+# alone.
 try:
-    import os
-    os.system("python misc/make-version.py \"allmydata-tahoe\" \"src/allmydata/_version.py\"")
+    os.system(" ".join([sys.executable,
+                       "misc/make-version.py",
+                       "allmydata-tahoe",
+                       '"src/allmydata/_version.py"', # cygwin vs slashes
+                        ]))
 except Exception, le:
     pass
 VERSIONFILE = "src/allmydata/_version.py"