From: Zooko Date: Tue, 30 Sep 2014 03:54:55 +0000 (+0000) Subject: remove all the unused scripts from build_helpers X-Git-Tag: allmydata-tahoe-1.10.1a1~128^2 X-Git-Url: https://git.rkrishnan.org/components/%22news.html/frontends/FTP-and-SFTP.txt?a=commitdiff_plain;h=f0ef82bfac730b41150c196e9f1c7696ef8f5cda;p=tahoe-lafs%2Ftahoe-lafs.git remove all the unused scripts from build_helpers Fixes #2305. --- diff --git a/Makefile b/Makefile index 94a87556..3905a8de 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TAHOE=$(PYTHON) bin/tahoe SOURCES=src/allmydata src/buildtest static misc bin/tahoe-script.template setup.py # This is necessary only if you want to automatically produce a new -# _version.py file from the current git/darcs history (without doing a build). +# _version.py file from the current git history (without doing a build). .PHONY: make-version make-version: $(PYTHON) ./setup.py update_version diff --git a/misc/build_helpers/clean-up-after-fake-dists.py b/misc/build_helpers/clean-up-after-fake-dists.py deleted file mode 100644 index a164a9c8..00000000 --- a/misc/build_helpers/clean-up-after-fake-dists.py +++ /dev/null @@ -1,6 +0,0 @@ -import glob, os, shutil - -if os.path.exists('support'): - shutil.rmtree('support') - -[shutil.rmtree(p) for p in glob.glob('pycryptopp*.egg')] diff --git a/misc/build_helpers/get-version.py b/misc/build_helpers/get-version.py deleted file mode 100644 index a3ef5d11..00000000 --- a/misc/build_helpers/get-version.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -"""Determine the version number of the current tree. - -This should be run after 'setup.py darcsver'. It will emit a single line of text -to stdout, either of the form '0.2.0' if this is a release tree (i.e. no patches -have been added since the last release tag), or '0.2.0-34' (if 34 patches have -been added since the last release tag). If the tree does not have a well-formed -version number, this will emit 'unknown'. - -The version string thus calculated should exactly match the version string -determined by setup.py (when it creates eggs and source tarballs) and also -the version available in the code image when you do: - - from allmydata import __version__ - -""" - -import os.path, re - -def get_version(): - VERSIONFILE = "src/allmydata/_version.py" - verstr = "unknown" - if os.path.exists(VERSIONFILE): - VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M) - verstrline = open(VERSIONFILE, "rt").read() - mo = VSRE.search(verstrline) - if mo: - verstr = mo.group(1) - else: - raise ValueError("if version.py exists, it must be well-formed") - - return verstr - -if __name__ == '__main__': - verstr = get_version() - print verstr - diff --git a/misc/build_helpers/pyver.py b/misc/build_helpers/pyver.py deleted file mode 100644 index d53db165..00000000 --- a/misc/build_helpers/pyver.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python - -import sys -print "python%d.%d" % (sys.version_info[:2]) diff --git a/misc/build_helpers/run-with-pythonpath.py b/misc/build_helpers/run-with-pythonpath.py deleted file mode 100644 index fd2fbe6f..00000000 --- a/misc/build_helpers/run-with-pythonpath.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- python -*- -# you must invoke this with an explicit python, from the tree root - -"""Run an arbitrary command with a PYTHONPATH that will include the Tahoe -code, including dependent libraries. Run this like: - - python misc/build_helpers/run-with-pythonpath.py python foo.py -""" - -import os, sys - -# figure out where support/lib/pythonX.X/site-packages is -# add it to os.environ["PYTHONPATH"] -# spawn the child process - - -def pylibdir(prefixdir): - pyver = "python%d.%d" % (sys.version_info[:2]) - if sys.platform == "win32": - return os.path.join(prefixdir, "Lib", "site-packages") - else: - return os.path.join(prefixdir, "lib", pyver, "site-packages") - -basedir = os.path.dirname(os.path.abspath(__file__)) -supportlib = pylibdir(os.path.abspath("support")) - -oldpp = os.environ.get("PYTHONPATH", "").split(os.pathsep) -if oldpp == [""]: - # grr silly split() behavior - oldpp = [] -newpp = os.pathsep.join(oldpp + [supportlib,]) -os.environ['PYTHONPATH'] = newpp - -from twisted.python.procutils import which -cmd = sys.argv[1] -if cmd and cmd[0] not in "/~.": - cmds = which(cmd) - if not cmds: - print >>sys.stderr, "'%s' not found on PATH" % (cmd,) - sys.exit(-1) - cmd = cmds[0] - -os.execve(cmd, sys.argv[1:], os.environ) diff --git a/misc/build_helpers/sub-ver.py b/misc/build_helpers/sub-ver.py deleted file mode 100644 index 6c1fbbad..00000000 --- a/misc/build_helpers/sub-ver.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -from allmydata import __version__ as v - -import sys - -if len(sys.argv) == 1: - input = sys.stdin -elif len(sys.argv) == 2: - fname = sys.argv[1] - input = file(fname, 'rb') -else: - raise ValueError('must provide 0 or 1 argument (stdin, or filename)') - -vern = { - 'major': v.major or 0, - 'minor': v.minor or 0, - 'point': v.micro or 0, - 'micro': v.micro or 0, - 'revision' : v.revision or 0, - 'build': str(v), - } - -for line in input.readlines(): - print line % vern, - diff --git a/misc/build_helpers/test-darcs-boringfile.py b/misc/build_helpers/test-darcs-boringfile.py deleted file mode 100644 index 619a4e44..00000000 --- a/misc/build_helpers/test-darcs-boringfile.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -import sys -from subprocess import Popen, PIPE - -cmd = ["darcs", "whatsnew", "-l"] -p = Popen(cmd, stdout=PIPE) -output = p.communicate()[0] -print output -if output == "No changes!\n": - sys.exit(0) -sys.exit(1) - -