mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-22 06:17:50 +00:00
Merge pull request #114 from zooko/2305-remove-obsolete-tools-from-misc
remove all the unused scripts from build_helpers
This commit is contained in:
commit
fc6d237044
2
Makefile
2
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
|
||||
|
@ -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')]
|
@ -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
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
print "python%d.%d" % (sys.version_info[:2])
|
@ -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)
|
@ -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,
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user