diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/Command.py | 2 | ||||
-rw-r--r-- | bin/SConsDoc.py | 3 | ||||
-rw-r--r-- | bin/SConsExamples.py | 2 | ||||
-rw-r--r-- | bin/caller-tree.py | 2 | ||||
-rw-r--r-- | bin/docs-create-example-outputs.py | 2 | ||||
-rw-r--r-- | bin/docs-update-generated.py | 2 | ||||
-rw-r--r-- | bin/docs-validate.py | 2 | ||||
-rw-r--r-- | bin/install_python.py | 117 | ||||
-rw-r--r-- | bin/install_scons.py | 2 | ||||
-rw-r--r-- | bin/linecount.py | 2 | ||||
-rw-r--r-- | bin/memlogs.py | 3 | ||||
-rw-r--r-- | bin/memoicmp.py | 2 | ||||
-rw-r--r-- | bin/objcounts.py | 2 | ||||
-rw-r--r-- | bin/scons-diff.py | 2 | ||||
-rw-r--r-- | bin/scons-proc.py | 2 | ||||
-rw-r--r-- | bin/scons-test.py | 2 | ||||
-rw-r--r-- | bin/scons-unzip.py | 2 | ||||
-rwxr-xr-x | bin/scons_dev_master.py | 2 | ||||
-rwxr-xr-x | bin/svn-bisect.py | 73 | ||||
-rwxr-xr-x | bin/xmlagenda.py | 101 |
20 files changed, 0 insertions, 327 deletions
diff --git a/bin/Command.py b/bin/Command.py index dadd7a9..a63e6c5 100644 --- a/bin/Command.py +++ b/bin/Command.py @@ -4,8 +4,6 @@ # # XXX Describe what the script does here. # -from __future__ import print_function - import getopt import os import shlex diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index a7c611d..eff8ba8 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -24,9 +24,6 @@ # # Module for handling SCons documentation processing. # -from __future__ import print_function - - __doc__ = r""" This module parses home-brew XML files that document various things in SCons. Right now, it handles Builders, functions, construction diff --git a/bin/SConsExamples.py b/bin/SConsExamples.py index 50fbb4e..ff72a27 100644 --- a/bin/SConsExamples.py +++ b/bin/SConsExamples.py @@ -86,8 +86,6 @@ # can see if there are any problems executing the command. # -from __future__ import print_function - import os import re import sys diff --git a/bin/caller-tree.py b/bin/caller-tree.py index 18cd9e1..184ae30 100644 --- a/bin/caller-tree.py +++ b/bin/caller-tree.py @@ -39,8 +39,6 @@ # function at the same time, for example, their counts will intermix. # So use this to get a *general* idea of who's calling what, not for # fine-grained performance tuning. -from __future__ import print_function - import sys class Entry(object): diff --git a/bin/docs-create-example-outputs.py b/bin/docs-create-example-outputs.py index 73aa31a..0124435 100644 --- a/bin/docs-create-example-outputs.py +++ b/bin/docs-create-example-outputs.py @@ -3,8 +3,6 @@ # Searches through the whole doc/user tree and creates # all output files for the single examples. # -from __future__ import print_function - import os import sys import SConsExamples diff --git a/bin/docs-update-generated.py b/bin/docs-update-generated.py index 78b60a7..52ebb0a 100644 --- a/bin/docs-update-generated.py +++ b/bin/docs-update-generated.py @@ -6,8 +6,6 @@ # as well as the entity declarations for them. # Uses scons-proc.py under the hood... # -from __future__ import print_function - import os import sys import subprocess diff --git a/bin/docs-validate.py b/bin/docs-validate.py index 342ed43..c4dd3b7 100644 --- a/bin/docs-validate.py +++ b/bin/docs-validate.py @@ -3,8 +3,6 @@ # Searches through the whole source tree and validates all # documentation files against our own XSD in docs/xsd. # -from __future__ import print_function - import sys,os import SConsDoc diff --git a/bin/install_python.py b/bin/install_python.py deleted file mode 100644 index 5c947ac..0000000 --- a/bin/install_python.py +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env python -# -# A script for unpacking and installing different historic versions of -# Python in a consistent manner for side-by-side development testing. -# -# This was written for a Linux system (specifically Ubuntu) but should -# be reasonably generic to any POSIX-style system with a /usr/local -# hierarchy. -from __future__ import print_function - -import getopt -import os -import shutil -import sys - -from Command import CommandRunner, Usage - -all_versions = [ - '2.3.7', - '2.4.5', - #'2.5.2', - '2.6', -] - -def main(argv=None): - if argv is None: - argv = sys.argv - - all = False - downloads_dir = 'Downloads' - downloads_url = 'http://www.python.org/ftp/python' - sudo = 'sudo' - prefix = '/usr/local' - - short_options = 'ad:hnp:q' - long_options = ['all', 'help', 'no-exec', 'prefix=', 'quiet'] - - helpstr = """\ -Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] - - -a, --all Install all SCons versions. - -d DIR, --downloads=DIR Downloads directory. - -h, --help Print this help and exit - -n, --no-exec No execute, just print command lines - -p PREFIX, --prefix=PREFIX Installation prefix. - -q, --quiet Quiet, don't print command lines -""" - - try: - try: - opts, args = getopt.getopt(argv[1:], short_options, long_options) - except getopt.error as msg: - raise Usage(msg) - - for o, a in opts: - if o in ('-a', '--all'): - all = True - elif o in ('-d', '--downloads'): - downloads_dir = a - elif o in ('-h', '--help'): - print(helpstr) - sys.exit(0) - elif o in ('-n', '--no-exec'): - CommandRunner.execute = CommandRunner.do_not_execute - elif o in ('-p', '--prefix'): - prefix = a - elif o in ('-q', '--quiet'): - CommandRunner.display = CommandRunner.do_not_display - except Usage as err: - sys.stderr.write(str(err.msg) + '\n') - sys.stderr.write('use -h to get help\n') - return 2 - - if all: - if args: - msg = 'install-scons.py: -a and version arguments both specified' - sys.stderr.write(msg) - sys.exit(1) - - args = all_versions - - cmd = CommandRunner() - - for version in args: - python = 'Python-' + version - tar_gz = os.path.join(downloads_dir, python + '.tgz') - tar_gz_url = os.path.join(downloads_url, version, python + '.tgz') - - cmd.subst_dictionary(locals()) - - if not os.path.exists(tar_gz): - if not os.path.exists(downloads_dir): - cmd.run('mkdir %(downloads_dir)s') - cmd.run('wget -O %(tar_gz)s %(tar_gz_url)s') - - cmd.run('tar zxf %(tar_gz)s') - - cmd.run('cd %(python)s') - - cmd.run('./configure --prefix=%(prefix)s %(configureflags)s 2>&1 | tee configure.out') - cmd.run('make 2>&1 | tee make.out') - cmd.run('%(sudo)s make install') - - cmd.run('%(sudo)s rm -f %(prefix)s/bin/{idle,pydoc,python,python-config,smtpd.py}') - - cmd.run('cd ..') - - cmd.run((shutil.rmtree, python), 'rm -rf %(python)s') - -if __name__ == "__main__": - sys.exit(main()) - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/bin/install_scons.py b/bin/install_scons.py index ed919f8..fa260a7 100644 --- a/bin/install_scons.py +++ b/bin/install_scons.py @@ -18,8 +18,6 @@ # be reasonably generic to any POSIX-style system with a /usr/local # hierarchy. -from __future__ import print_function - import getopt import os import shutil diff --git a/bin/linecount.py b/bin/linecount.py index 897f1e8..163401b 100644 --- a/bin/linecount.py +++ b/bin/linecount.py @@ -21,8 +21,6 @@ # in each category, the number of non-blank lines, and the number of # non-comment lines. The last figure (non-comment) lines is the most # interesting one for most purposes. -from __future__ import division, print_function - __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os.path diff --git a/bin/memlogs.py b/bin/memlogs.py index b450939..223443a 100644 --- a/bin/memlogs.py +++ b/bin/memlogs.py @@ -20,9 +20,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -from __future__ import print_function - import getopt import sys diff --git a/bin/memoicmp.py b/bin/memoicmp.py index 63f6538..d6aae13 100644 --- a/bin/memoicmp.py +++ b/bin/memoicmp.py @@ -3,8 +3,6 @@ # A script to compare the --debug=memoizer output found in # two different files. -from __future__ import print_function - import sys def memoize_output(fname): diff --git a/bin/objcounts.py b/bin/objcounts.py index 8b550d1..f387ad5 100644 --- a/bin/objcounts.py +++ b/bin/objcounts.py @@ -20,8 +20,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -from __future__ import print_function - import re import sys diff --git a/bin/scons-diff.py b/bin/scons-diff.py index 09b3dcc..da5ae76 100644 --- a/bin/scons-diff.py +++ b/bin/scons-diff.py @@ -8,8 +8,6 @@ # etc. so that you can diff trees without having to ignore changes in # version lines. # -from __future__ import print_function - import difflib import getopt import os.path diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 23e092d..fb05d32 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -9,8 +9,6 @@ # DocBook-formatted generated XML files containing the summary text # and/or .mod files containing the ENTITY definitions for each item. # -from __future__ import print_function - import getopt import os import re diff --git a/bin/scons-test.py b/bin/scons-test.py index d4ddfc9..da92765 100644 --- a/bin/scons-test.py +++ b/bin/scons-test.py @@ -14,8 +14,6 @@ # relevant information about the system, the Python version, etc., # so that problems on different platforms can be identified sooner. # -from __future__ import print_function - import atexit import getopt import os diff --git a/bin/scons-unzip.py b/bin/scons-unzip.py index a64179f..412c56a 100644 --- a/bin/scons-unzip.py +++ b/bin/scons-unzip.py @@ -7,8 +7,6 @@ # I'm using this to make it more convenient to manage working on multiple # changes on Windows, where I don't have access to my Aegis tools. # -from __future__ import print_function - import getopt import os.path import sys diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py index c8cc0f9..5ed7d49 100755 --- a/bin/scons_dev_master.py +++ b/bin/scons_dev_master.py @@ -3,8 +3,6 @@ # A script for turning a generic Ubuntu system into a master for # SCons development. -from __future__ import print_function - import getopt import sys diff --git a/bin/svn-bisect.py b/bin/svn-bisect.py deleted file mode 100755 index 575b15e..0000000 --- a/bin/svn-bisect.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python -# -*- Python -*- -from __future__ import division, print_function - -import sys -from math import log, ceil -from optparse import OptionParser -import subprocess - -# crack the command line -parser = OptionParser( - usage="%prog lower-revision upper-revision test_script [arg1 ...]", - description="Binary search for a bug in a SVN checkout") -(options,script_args) = parser.parse_args() - -# make sure we have sufficient parameters -if len(script_args) < 1: - parser.error("Need a lower revision") -elif len(script_args) < 2: - parser.error("Need an upper revision") -elif len(script_args) < 3: - parser.error("Need a script to run") - -# extract our starting values -lower = int(script_args[0]) -upper = int(script_args[1]) -script = script_args[2:] - -# print an error message and quit -def error(s): - print("******", s, "******", file=sys.stderr) - sys.exit(1) - -# update to the specified version and run test -def testfail(revision): - """Return true if test fails""" - print("Updating to revision", revision) - if subprocess.call(["svn","up","-qr",str(revision)]) != 0: - m = "SVN did not update properly to revision %d" - raise RuntimeError(m % revision) - return subprocess.call(script,shell=False) != 0 - -# confirm that the endpoints are different -print("****** Checking upper bracket", upper) -upperfails = testfail(upper) -print("****** Checking lower bracket", lower) -lowerfails = testfail(lower) -if upperfails == lowerfails: - error("Upper and lower revisions must bracket the failure") - -# binary search for transition -msg = "****** max %d revisions to test (bug bracketed by [%d,%d])" -while upper-lower > 1: - print(msg % (ceil(log(upper-lower,2)), lower, upper)) - - mid = (lower + upper)//2 - midfails = testfail(mid) - if midfails == lowerfails: - lower = mid - lowerfails = midfails - else: - upper = mid - upperfails = midfails - -# show which revision was first to fail -if upperfails != lowerfails: lower = upper -print("The error was caused by revision", lower) - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/bin/xmlagenda.py b/bin/xmlagenda.py deleted file mode 100755 index 7091ee5..0000000 --- a/bin/xmlagenda.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env python - -# Query gihub issue tracker for the issues of interest. -# The typical triage query is found on -# https://github.com/scons/scons/wiki/BugParty -# FIXME: this needs reworking for github, and wiki needs updating - -# Download the issues from Issuezilla as XML; this creates a file -# named 'issues.xml'. Run this script in the dir containing -# issues.xml (or pass full path as arg to this script) to translate -# 'issues.xml' into a CSV file named 'editlist.csv'. Upload the CSV -# into a Google spreadsheet. - -# In the spreadsheet: -# Select all the columns and pick "align-->top" -# Select the ID and votes columns and pick "align-->right" -# Select the priority column and pick "align-->center" -# Select the first row and click on the "bold" button -# Grab the lines between the column headers to adjust the column widths -# Grab the sort bar on the far left (just above the "1" for row one) -# and move it down one row. (Row one becomes a floating header) -# Voila! -from __future__ import print_function - -# The team members -# FIXME: These names really should be external to this script -team = sorted('Steven Gary Greg Ken Jim Bill Jason Dirk Anatoly'.split()) - -# The elements to be picked out of the issue -PickList = [ - # sort key -- these are used to sort the entry - 'target_milestone', 'priority', 'votes_desc', 'creation_ts', - # payload -- these are displayed - 'issue_id', 'votes', 'issue_type', 'target_milestone', - 'priority', 'assigned_to', 'short_desc', - ] - -# Conbert a leaf element into its value as a text string -# We assume it's "short enough" that there's only one substring -def Value(element): - v = element.firstChild - if v is None: return '' - return v.nodeValue - -# Parse the XML issues file and produce a DOM for it -import sys -if len(sys.argv) > 1: xml = sys.argv[1] -else: xml = 'issues.xml' -from xml.dom.minidom import parse -xml = parse(xml) - -# Go through the issues in the DOM, pick out the elements we want, -# and put them in our list of issues. -issues = [] -for issuezilla in xml.childNodes: - # The Issuezilla element contains the issues - if issuezilla.nodeType != issuezilla.ELEMENT_NODE: continue - for issue in issuezilla.childNodes: - # The issue elements contain the info for an issue - if issue.nodeType != issue.ELEMENT_NODE: continue - # Accumulate the pieces we want to include - d = {} - for element in issue.childNodes: - if element.nodeName in PickList: - d[element.nodeName] = Value(element) - # convert 'votes' to numeric, ascending and descending - try: - v = int('0' + d['votes']) - except KeyError: - pass - else: - d['votes_desc'] = -v - d['votes'] = v - # Marshal the elements and add them to the list - issues.append([ d[ix] for ix in PickList ]) -issues.sort() - -# Transcribe the issues into comma-separated values. -# FIXME: parameterize the output file name -import csv -writer = csv.writer(open('editlist.csv', 'w')) -# header -writer.writerow(['ID', 'Votes', 'Type/Member', 'Milestone', - 'Pri', 'Owner', 'Summary/Comments']) -for issue in issues: - row = issue[4:] # strip off sort key - #row[0] = """=hyperlink("http://scons.tigris.org/issues/show_bug.cgi?id=%s","%s")""" % (row[0],row[0]) - if row[3] == '-unspecified-': row[3] = 'triage' - writer.writerow(['','','','','','','']) - writer.writerow(row) - writer.writerow(['','','consensus','','','','']) - writer.writerow(['','','','','','','']) - for member in team: writer.writerow(['','',member,'','','','']) - -print("Exported %d issues to editlist.csv. Ready to upload to Google."%len(issues)) - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: |