basedir = os.path.dirname(os.path.abspath(__file__))
supportlib = pylibdir(os.path.join(basedir, "support"))
-for i in range(len(sys.argv)):
- arg = sys.argv[i]
- if arg == "build_tahoe":
- del sys.argv[i]
- sys.argv.extend(["develop", "--prefix=support", "--script-dir=support/bin"])
for i in range(len(sys.argv)):
arg = sys.argv[i]
pp.append(libdir)
os.environ['PYTHONPATH'] = os.pathsep.join(pp)
- if arg.startswith("build"):
- # chmod +x bin/tahoe
- bin_tahoe = os.path.join("bin", "tahoe")
- old_mode = stat.S_IMODE(os.stat(bin_tahoe)[stat.ST_MODE])
- new_mode = old_mode | (stat.S_IXUSR | stat.S_IRUSR |
- stat.S_IXGRP | stat.S_IRGRP |
- stat.S_IXOTH | stat.S_IROTH )
- os.chmod(bin_tahoe, new_mode)
-
if arg.startswith("install") or arg.startswith("develop"):
if sys.platform == "linux2":
# workaround for tahoe #229 / setuptools #17, on debian
def finalize_options(self):
pass
def run(self):
+ # chmod +x bin/tahoe
+ bin_tahoe = os.path.join("bin", "tahoe")
+ old_mode = stat.S_IMODE(os.stat(bin_tahoe)[stat.ST_MODE])
+ new_mode = old_mode | (stat.S_IXUSR | stat.S_IRUSR |
+ stat.S_IXGRP | stat.S_IRGRP |
+ stat.S_IXOTH | stat.S_IROTH )
+ os.chmod(bin_tahoe, new_mode)
+
# On Windows, create the 'tahoe-script.py' file based on the 'tahoe'
# executable script under the 'bin' directory so that the tahoe.exe
# will work correctly. The 'tahoe-script.py' file is exactly the same
f.close()
else:
shutil.copy(cli_exe, tahoe_exe)
- bin_tahoe = os.path.join("bin", "tahoe")
f = open(bin_tahoe, "r")
script_lines = f.readlines()
f.close()
f.write(line)
f.close()
- command = [sys.executable, "setup.py", "develop", "--prefix", "support"]
+ command = [sys.executable, "setup.py", "develop", "--prefix=support"]
print "Command:", " ".join(command)
rc = subprocess.call(command)
if rc < 0: