setup.py,Makefile: move the 'chmod +x bin/tahoe' into setup.py

This commit is contained in:
Brian Warner 2008-09-17 16:07:56 -07:00
parent add26fdcd3
commit 050bee8fdc
2 changed files with 9 additions and 2 deletions

View File

@ -72,7 +72,6 @@ build: src/allmydata/_version.py
# setuptools.
build-once:
$(PYTHON) setup.py build_tahoe
chmod +x bin/tahoe
touch .built
# 'make install' will do the following:

View File

@ -8,7 +8,7 @@
#
# See the docs/about.html file for licensing information.
import os, re, sys, subprocess
import os, re, sys, stat, subprocess
##### sys.path management
@ -284,6 +284,14 @@ class BuildTahoe(Command):
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)
# 'setup.py develop --prefix SUPPORT' will complain if SUPPORTLIB is
# not on PYTHONPATH, because it thinks you are installing to a place
# that will not be searched at runtime (which is true, except that we