Commits

Rob Williams committed 3dd1072

Refactored to just build infrastructure

Comments (0)

Files changed (49)

MANIFEST.in

-include *.txt
-recursive-include doc *.txt

activate

-#!/bin/bash
-# Activate this project
-
-echo 'WARN:  Should be executed as "source activate", was it?'
-
-# Dump incoming environment for troubleshooting
-env | sort > ./env.out
-
-# Remember the current directory as our project home
-export HomeProject=${PWD}
-
-source $HomeProject/project.env
-source $HomeProject/configure_build_tools
-source $HomeBuildTools/bin_shared/helper/configure_project
+#!/bin/bash
+# Activate this project
+
+echo 'WARN:  Should be executed as "source activate", was it?'
+
+# Dump incoming environment for troubleshooting
+env | sort > ./env.out
+
+# Remember the current directory as our project home
+export HomeProject=${PWD}
+
+source $HomeProject/project.env
+source $HomeProject/configure_build_tools
+source $HomeBuildTools/bin_shared/helper/configure_project

bin/Python/build-sdist

+#!/bin/bash
+# Build a source distribution (sdist) of this Python project.
+
+echo "build-sdist..."
+cd "${HomeProject}"
+python setup.py sdist
+#!/bin/bash
+# Clean the project directory of all output and temporary files
+
+rm ${HomeProject}/MANIFEST
+
+rm -fr ${HomeProject}/dist
+
+find ${HomeProject} \( -type f -a -name "*.pyc"         \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name ".coverage"     \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name "coverage.xml"  \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name "env.out"       \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name "nosetests.xml" \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name "pylint.out"    \) -exec rm {} \;
+find ${HomeProject} \( -type f -a -name "sloccount.sc"  \) -exec rm {} \;

bin/Python/dependencies-freeze

+#!/bin/bash
+# Freeze the dependencies for this project using Pip
+
+_File=${HomeProject}/cfg/freeze.pip
+
+pip freeze -r "${_File}" > "${_File}"

bin/Python/dependencies-install

+#!/bin/bash
+# Use Pip to install dependencies from a previous freeze
+
+_File=${HomeProject}/cfg/freeze.pip
+
+# Install from the previously-frozen dependency list
+pip --quiet install -r "${_File}"
+
+# Report the installed dependencies
+pip freeze

bin/Python/helper/configure_PATH

+#!/bin/bash
+
+echo 'INFO:  Configure system execution PATH'
+
+_PathBuild=$HomeBuildTools/bin_shared
+_PathProject=$HomeProject/bin
+_PathPve=$HomeProject/PVE/bin
+_PathSystem=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+export PATH=${_PathProject}:${_PathBuild}:${_PathPve}:${_PathSystem}

bin/Python/helper/configure_TMPDIR

+#!/bin/bash
+
+echo 'INFO:  Configure temporary directory (TMPDIR)'
+
+[[   -z "$TMPDIR" ]] && \
+  echo 'FATAL:  Missing value for $TMPDIR' && exit 1
+[[ ! -e "$TMPDIR" ]] && \
+  echo "INFO:  Creating $TMPDIR" && \
+  mkdir -p "$TMPDIR"
+[[   -d "$TMPDIR" ]] && \
+  echo "INFO:  Directory $TMPDIR exists"

bin/Python/helper/configure_output

+#!/bin/bash
+
+echo 'INFO:  Configure output directory'
+
+[[   -z "$HomeProject" ]] && \
+  echo 'FATAL:  Missing value for $HomeProject' && exit 1
+[[ ! -e "$HomeProject/out" ]] && \
+  echo "INFO:  Creating $HomeProject/out" && \
+  mkdir "$HomeProject/out"
+[[   -d "$HomeProject/out" ]] && \
+  echo "INFO:  Directory $HomeProject/out exists"

bin/Python/helper/configure_pip

+#!/bin/bash
+
+echo 'INFO:  Configure Pip'
+
+export PIP_REQUIRE_VIRTUALENV=true
+export PIP_RESPECT_VIRTUALENV=true
+[[   -z "$PIP_DOWNLOAD_CACHE" ]] && \
+  echo 'FATAL:  Missing value for $PIP_DOWNLOAD_CACHE' && exit 1
+[[ ! -e "$PIP_DOWNLOAD_CACHE" ]] && \
+  echo "INFO:  Creating $PIP_DOWNLOAD_CACHE" && \
+  mkdir -p "$PIP_DOWNLOAD_CACHE"
+[[   -d "$PIP_DOWNLOAD_CACHE" ]] && \
+  echo "INFO:  Directory $PIP_DOWNLOAD_CACHE exists"

bin/Python/helper/configure_virtualenv

+#!/bin/bash
+
+echo 'INFO:  Configure Python virtualenv'
+
+# Verify Pip integration
+[[   -z "$PIP_REQUIRE_VIRTUALENV" ]] && \
+  echo 'FATAL:  Missing value for $PIP_REQUIRE_VIRTUALENV' && exit 1
+[[   -z "$PIP_RESPECT_VIRTUALENV" ]] && \
+  echo 'FATAL:  Missing value for $PIP_RESPECT_VIRTUALENV' && exit 1
+
+# If the virtual environment does not already exist, create it
+[[ ! -f "$HomeProject/PVE/bin/activate" ]] && \
+  echo "WARN:  Creating PVE!" && \
+  virtualenv --no-site-packages "$HomeProject/PVE"
+
+# Activate the Python virtual environment (PVE)
+source "$HomeProject/PVE/bin/activate"
+[[ -z "$VIRTUAL_ENV" ]] && \
+  echo 'FATAL:  Missing value for $VIRTUAL_ENV' && exit 1
+export PYTHONHOME=$VIRTUAL_ENV

bin/Python/run-for-jenkins

+#!/bin/bash
+# Run build steps for Jenkins continuous integration server
+
+echo "run-for-jenkins..."
+source run-sloccount
+source run-nose
+source run-pylint
+source build-sdist
+#!/bin/bash
+# Run Nose on this project
+
+echo "run-nose..."
+cd "${HomeProject}/src"
+
+_Cmd=nosetests
+_Cmd="$_Cmd --config=${HomeProject}/cfg/nose.cfg"
+_Cmd="$_Cmd --id-file=${HomeProject}/.noseids"
+_Cmd="$_Cmd --cover-package=${HomePackage}"
+$_Cmd

bin/Python/run-pylint

+#!/bin/bash
+# Run pylint on this project
+
+echo "run-pylint..."
+cd "${HomeProject}/src"
+
+_Cmd=pylint
+_Cmd="$_Cmd --rcfile=${HomeProject}/cfg/pylintrc"
+_Cmd="$_Cmd ${HomePackage}"
+$_Cmd | tee ${HomeProject}/out/pylint.out

bin/Python/run-sloccount

+#!/bin/bash
+# Run sloccount to count lines-of-code (LOC) in this project
+# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
+
+echo "run-sloccount..."
+_Cmd=sloccount
+_Cmd="$_Cmd --addlangall --details --wide"
+_Cmd="$_Cmd ${HomeProject}/activate"
+_Cmd="$_Cmd ${HomeProject}/configure_build_tools"
+_Cmd="$_Cmd ${HomeProject}/project.env"
+_Cmd="$_Cmd ${HomeProject}/setup.py"
+_Cmd="$_Cmd ${HomeProject}/bin"
+_Cmd="$_Cmd ${HomeProject}/cfg"
+_Cmd="$_Cmd ${HomeProject}/doc"
+_Cmd="$_Cmd ${HomeProject}/src"
+$_Cmd > ${HomeProject}/out/sloccount.sc

bin/configure_Python_project

+#!/bin/bash
+
+echo 'INFO:  Configure project (general)'
+
+source $HomeBuildTools/bin_shared/helper/configure_TMPDIR
+source $HomeBuildTools/bin_shared/helper/configure_pip
+source $HomeBuildTools/bin_shared/helper/configure_virtualenv
+source $HomeBuildTools/bin_shared/helper/configure_PATH
+source $HomeBuildTools/bin_shared/helper/configure_output

bin/run-sloccount

-#!/bin/bash
-# Run sloccount to count lines-of-code (LOC) in this project
-# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
-
-echo "run-sloccount for the build project..."
-_Cmd=sloccount
-_Cmd="$_Cmd --addlangall --details --wide"
-_Cmd="$_Cmd ${HomeProject}/activate"
-_Cmd="$_Cmd ${HomeProject}/configure_build_tools"
-_Cmd="$_Cmd ${HomeProject}/project.env"
-_Cmd="$_Cmd ${HomeProject}/setup.py"
-_Cmd="$_Cmd ${HomeProject}/bin"
-_Cmd="$_Cmd ${HomeProject}/bin_shared"
-_Cmd="$_Cmd ${HomeProject}/cfg"
-_Cmd="$_Cmd ${HomeProject}/doc"
-_Cmd="$_Cmd ${HomeProject}/src"
-$_Cmd > ${HomeProject}/out/sloccount.sc

bin/upgrade

-#!/bin/bash
-# Upgrade dependencies using Pip
-
-# Low-level dependencies
-pip install --upgrade distribute
-pip install --upgrade logilab-astng
-pip install --upgrade logilab-common
-pip install --upgrade nosexcover
-pip install --upgrade unittest2
-pip install --upgrade wsgiref
-
-# Primary testing dependencies
-pip install --upgrade coverage
-pip install --upgrade nose
-pip install --upgrade pylint
-
-# Primary source control dependencies
-pip install --upgrade mercurial
-
-# Report new versions
-pip freeze

bin_shared/build-sdist

-#!/bin/bash
-# Build a source distribution (sdist) of this Python project.
-
-echo "build-sdist..."
-cd "${HomeProject}"
-python setup.py sdist

bin_shared/clean

-#!/bin/bash
-# Clean the project directory of all output and temporary files
-
-rm ${HomeProject}/MANIFEST
-
-rm -fr ${HomeProject}/dist
-
-find ${HomeProject} \( -type f -a -name "*.pyc"         \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name ".coverage"     \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name "coverage.xml"  \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name "env.out"       \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name "nosetests.xml" \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name "pylint.out"    \) -exec rm {} \;
-find ${HomeProject} \( -type f -a -name "sloccount.sc"  \) -exec rm {} \;

bin_shared/freeze

-#!/bin/bash
-# Freeze the dependencies for this project using Pip
-
-_File=${HomeProject}/cfg/freeze.pip
-
-pip freeze -r "${_File}" > "${_File}"

bin_shared/helper/configure_PATH

-#!/bin/bash
-
-echo 'INFO:  Configure system execution PATH'
-
-_PathBuild=$HomeBuildTools/bin_shared
-_PathProject=$HomeProject/bin
-_PathPve=$HomeProject/PVE/bin
-_PathSystem=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-export PATH=${_PathProject}:${_PathBuild}:${_PathPve}:${_PathSystem}

bin_shared/helper/configure_TMPDIR

-#!/bin/bash
-
-echo 'INFO:  Configure temporary directory (TMPDIR)'
-
-[[   -z "$TMPDIR" ]] && \
-  echo 'FATAL:  Missing value for $TMPDIR' && exit 1
-[[ ! -e "$TMPDIR" ]] && \
-  echo "INFO:  Creating $TMPDIR" && \
-  mkdir -p "$TMPDIR"
-[[   -d "$TMPDIR" ]] && \
-  echo "INFO:  Directory $TMPDIR exists"

bin_shared/helper/configure_output

-#!/bin/bash
-
-echo 'INFO:  Configure output directory'
-
-[[   -z "$HomeProject" ]] && \
-  echo 'FATAL:  Missing value for $HomeProject' && exit 1
-[[ ! -e "$HomeProject/out" ]] && \
-  echo "INFO:  Creating $HomeProject/out" && \
-  mkdir "$HomeProject/out"
-[[   -d "$HomeProject/out" ]] && \
-  echo "INFO:  Directory $HomeProject/out exists"

bin_shared/helper/configure_pip

-#!/bin/bash
-
-echo 'INFO:  Configure Pip'
-
-export PIP_REQUIRE_VIRTUALENV=true
-export PIP_RESPECT_VIRTUALENV=true
-[[   -z "$PIP_DOWNLOAD_CACHE" ]] && \
-  echo 'FATAL:  Missing value for $PIP_DOWNLOAD_CACHE' && exit 1
-[[ ! -e "$PIP_DOWNLOAD_CACHE" ]] && \
-  echo "INFO:  Creating $PIP_DOWNLOAD_CACHE" && \
-  mkdir -p "$PIP_DOWNLOAD_CACHE"
-[[   -d "$PIP_DOWNLOAD_CACHE" ]] && \
-  echo "INFO:  Directory $PIP_DOWNLOAD_CACHE exists"

bin_shared/helper/configure_project

-#!/bin/bash
-
-echo 'INFO:  Configure project (general)'
-
-source $HomeBuildTools/bin_shared/helper/configure_TMPDIR
-source $HomeBuildTools/bin_shared/helper/configure_pip
-source $HomeBuildTools/bin_shared/helper/configure_virtualenv
-source $HomeBuildTools/bin_shared/helper/configure_PATH
-source $HomeBuildTools/bin_shared/helper/configure_output

bin_shared/helper/configure_virtualenv

-#!/bin/bash
-
-echo 'INFO:  Configure Python virtualenv'
-
-# Verify Pip integration
-[[   -z "$PIP_REQUIRE_VIRTUALENV" ]] && \
-  echo 'FATAL:  Missing value for $PIP_REQUIRE_VIRTUALENV' && exit 1
-[[   -z "$PIP_RESPECT_VIRTUALENV" ]] && \
-  echo 'FATAL:  Missing value for $PIP_RESPECT_VIRTUALENV' && exit 1
-
-# If the virtual environment does not already exist, create it
-[[ ! -f "$HomeProject/PVE/bin/activate" ]] && \
-  echo "WARN:  Creating PVE!" && \
-  virtualenv --no-site-packages "$HomeProject/PVE"
-
-# Activate the Python virtual environment (PVE)
-source "$HomeProject/PVE/bin/activate"
-[[ -z "$VIRTUAL_ENV" ]] && \
-  echo 'FATAL:  Missing value for $VIRTUAL_ENV' && exit 1
-export PYTHONHOME=$VIRTUAL_ENV

bin_shared/install-from-freeze

-#!/bin/bash
-# Use Pip to install dependencies from a previous freeze
-
-_File=${HomeProject}/cfg/freeze.pip
-
-# Install from the previously-frozen dependency list
-pip --quiet install -r "${_File}"
-
-# Report the installed dependencies
-pip freeze

bin_shared/run-for-jenkins

-#!/bin/bash
-# Run build steps for Jenkins continuous integration server
-
-echo "run-for-jenkins..."
-source run-sloccount
-source run-nose
-source run-pylint
-source build-sdist

bin_shared/run-nose

-#!/bin/bash
-# Run Nose on this project
-
-echo "run-nose..."
-cd "${HomeProject}/src"
-
-_Cmd=nosetests
-_Cmd="$_Cmd --config=${HomeProject}/cfg/nose.cfg"
-_Cmd="$_Cmd --id-file=${HomeProject}/.noseids"
-_Cmd="$_Cmd --cover-package=${HomePackage}"
-$_Cmd

bin_shared/run-pylint

-#!/bin/bash
-# Run pylint on this project
-
-echo "run-pylint..."
-cd "${HomeProject}/src"
-
-_Cmd=pylint
-_Cmd="$_Cmd --rcfile=${HomeProject}/cfg/pylintrc"
-_Cmd="$_Cmd ${HomePackage}"
-$_Cmd | tee ${HomeProject}/out/pylint.out

bin_shared/run-sloccount

-#!/bin/bash
-# Run sloccount to count lines-of-code (LOC) in this project
-# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
-
-echo "run-sloccount..."
-_Cmd=sloccount
-_Cmd="$_Cmd --addlangall --details --wide"
-_Cmd="$_Cmd ${HomeProject}/activate"
-_Cmd="$_Cmd ${HomeProject}/configure_build_tools"
-_Cmd="$_Cmd ${HomeProject}/project.env"
-_Cmd="$_Cmd ${HomeProject}/setup.py"
-_Cmd="$_Cmd ${HomeProject}/bin"
-_Cmd="$_Cmd ${HomeProject}/cfg"
-_Cmd="$_Cmd ${HomeProject}/doc"
-_Cmd="$_Cmd ${HomeProject}/src"
-$_Cmd > ${HomeProject}/out/sloccount.sc

cfg/freeze.pip

-## The following requirements were added by pip --freeze:
-coverage==3.4
-distribute==0.6.19
-logilab-astng==0.21.1
-logilab-common==0.55.2
-mercurial==1.8.4
-nose==1.0.0
-nosexcover==1.0.5
-pylint==0.23.0
-unittest2==0.5.1
-wsgiref==0.1.2

cfg/nose.cfg

-[nosetests]
-cover-erase=1
-cover-tests=1
-nocapture=1
-verbosity=3
-with-coverage=1
-with-id=1
-with-profile=1
-with-xcoverage=1
-with-xunit=1
-
-# NOTE:  Isolation conflicts with some other plugins, leave it off
-# with-isolation=1
-
-###############################################################################
-# TODO:  Using this functionality appears to need some serious research
-
-# TODO:  Set to the number of processor cores in the machine
-# processes=1
-
-# process-timeout is in seconds
-# process-timeout=60

cfg/pylintrc

-[MASTER]
-
-# Python code to execute, usually for sys.path manipulation such as
-# pygtk.require().
-#init-hook=
-
-# Profiled execution.
-profile=no
-
-# Add <file or directory> to the black list. It should be a base name, not a
-# path. You may set this option multiple times.
-#ignore=
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-
-[MESSAGES CONTROL]
-
-# Enable the message, report, category or checker with the given id(s). You can
-# either give multiple identifier separated by comma (,) or put this option
-# multiple time.
-#enable=
-
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifier separated by comma (,) or put this option
-# multiple time (only on the command line, not in the configuration file where
-# it should appear only once).
-#disable=
-
-
-[REPORTS]
-
-# Set the output format. Available formats are text, parseable, colorized, msvs
-# (visual studio) and html
-output-format=parseable
-
-# Include message's id in output
-include-ids=yes
-
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
-# Tells whether to display a full report or only the messages
-reports=yes
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note). You have access to the variables errors warning, statement which
-# respectively contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (RP0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (RP0004).
-comment=no
-
-
-[BASIC]
-
-# Required attributes for module, separated by a comma
-required-attributes=
-
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input
-
-# Regular expression which should only match correct module names
-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
-# Regular expression which should only match correct module level names
-# const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-const-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct argument names
-argument-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct variable names
-# variable-rgx=[a-z_][a-z0-9_]{2,30}$
-# NOTE:  I am already disciplined enough to not use unusually-short variable
-# names, but sometimes they are handy and I don't want to fuss over them.
-variable-rgx=[a-z_][a-z0-9_]{0,30}$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Good variable names which should always be accepted, separated by a comma
-# good-names=i,j,k,ex,Run,_
-good-names=
-
-# Bad variable names which should always be refused, separated by a comma
-# bad-names=foo,bar,baz,toto,tutu,tata
-bad-names=
-
-# Regular expression which should only match functions or classes name which do
-# not require a docstring
-no-docstring-rgx=__.*__
-
-
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=79
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string='    '
-
-
-[TYPECHECK]
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-# ignore-mixin-members=yes
-ignore-mixin-members=no
-
-# List of classes names for which member attributes should not be checked
-# (useful for classes with attributes dynamically set).
-# ignored-classes=SQLObject
-ignored-classes=
-
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E0201 when accessed.
-# generated-members=REQUEST,acl_users,aq_parent
-generated-members=
-
-
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-# min-similarity-lines=4
-min-similarity-lines=3
-
-# Ignore comments when computing similarities.
-# ignore-comments=yes
-ignore-comments=no
-
-# Ignore docstrings when computing similarities.
-# ignore-docstrings=yes
-ignore-docstrings=no
-
-
-[VARIABLES]
-
-# Tells whether we should check for unused import in __init__ files.
-# init-import=no
-init-import=yes
-
-# A regular expression matching the beginning of the name of dummy variables
-# (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-# notes=FIX,FIXME,XXX,TODO
-notes=FIX,NOTE,RDW,RESEARCH,REVIEW,TODO
-
-
-[IMPORTS]
-
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled)
-import-graph=
-
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled)
-ext-import-graph=
-
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled)
-int-import-graph=
-
-
-[CLASSES]
-
-# List of interface methods to ignore, separated by a comma. This is used for
-# instance to not check methods defines in Zope's Interface base class.
-# ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
-ignore-iface-methods=
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
-
-
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=5
-
-# Argument names that match this expression will be ignored. Default to name
-# with leading underscore
-# ignored-argument-names=_.*
-ignored-argument-names=
-
-# Maximum number of locals for function / method body
-max-locals=15
-
-# Maximum number of return / yield for function / method body
-max-returns=6
-
-# Maximum number of branch for function / method body
-max-branchs=12
-
-# Maximum number of statements in function / method body
-max-statements=50
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=7
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=2
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20

configure_build_tools

-#!/bin/bash
-
-echo 'INFO:  Configure build tools'
-
-[[   -z "$ParentBuildTools" ]] && \
-  echo 'FATAL: Missing value for $ParentBuildTools' && exit 1
-[[ ! -e "$ParentBuildTools" ]] && \
-  mkdir -p "$ParentBuildTools"
-[[ ! -d "$ParentBuildTools" ]] && \
-  echo "FATAL: Missing directory $ParentBuildTools" && exit 1
-[[   -z "$RevisionBuildTools" ]] && \
-  echo 'FATAL: Missing value for $RevisionBuildTools' && exit 1
-HomeBuildTools=$ParentBuildTools/$RevisionBuildTools
-[[   -z "$HomeBuildTools" ]] && \
-  echo 'FATAL: Missing value for $HomeBuildTools' && exit 1
-[[ ! -e "$HomeBuildTools" ]] && \
-  hg clone --rev "$RevisionBuildTools" "ssh://hg@bitbucket.org/robwilliams/build" "$HomeBuildTools"
-[[ ! -d "$HomeBuildTools" ]] && \
-  echo "FATAL: Missing directory $HomeBuildTools" && exit 1
-cd $HomeBuildTools
-hg fetch
-cd $HomeProject
 
 someday Trac + Mercurial + Bitten?
 
-Hudson plugins:
+Jenkins plugins:
     Promoted Builds
 Python packages
     NoseJS
+#!/bin/bash
+
+echo 'INFO:  Configure project (specific)'
+
+# Configure project home package (parent package of all project source)
+# NOTE:  All project source should be contained in
+#        ${HomeProject}/src/${HomePackage}
+export HomePackage=example
+
+# Configure build tools
+ParentBuildTools=~/tool/build
+RevisionBuildTools=tip
+
+# Configure PIP download cache
+[[   -z "$TMPDIR" ]] && \
+  echo 'FATAL: Missing value for $TMPDIR' && exit 1
+export PIP_DOWNLOAD_CACHE=$TMPDIR/pip

project.env

-#!/bin/bash
-
-echo 'INFO:  Configure project (specific)'
-
-# Configure project home package (parent package of all project source)
-# NOTE:  All project source should be contained in
-#        ${HomeProject}/src/${HomePackage}
-export HomePackage=example
-
-# Configure build tools
-ParentBuildTools=~/tool/build
-RevisionBuildTools=tip
-
-# Configure PIP download cache
-[[   -z "$TMPDIR" ]] && \
-  echo 'FATAL: Missing value for $TMPDIR' && exit 1
-export PIP_DOWNLOAD_CACHE=$TMPDIR/pip

sample/Python/bin/dependencies-upgrade

+#!/bin/bash
+# Upgrade dependencies using Pip
+
+# Low-level dependencies
+pip install --upgrade distribute
+pip install --upgrade logilab-astng
+pip install --upgrade logilab-common
+pip install --upgrade nosexcover
+pip install --upgrade unittest2
+pip install --upgrade wsgiref
+
+# Primary testing dependencies
+pip install --upgrade coverage
+pip install --upgrade nose
+pip install --upgrade pylint
+
+# Primary source control dependencies
+pip install --upgrade mercurial
+
+# Report new versions
+pip freeze

sample/Python/bin/run-sloccount

+#!/bin/bash
+# Run sloccount to count lines-of-code (LOC) in this project
+# NOTE:  Do NOT include subdirectories "dist", "out", or "PVE"
+
+echo "run-sloccount for the build project..."
+_Cmd=sloccount
+_Cmd="$_Cmd --addlangall --details --wide"
+_Cmd="$_Cmd ${HomeProject}/activate"
+_Cmd="$_Cmd ${HomeProject}/configure_build_tools"
+_Cmd="$_Cmd ${HomeProject}/project.env"
+_Cmd="$_Cmd ${HomeProject}/setup.py"
+_Cmd="$_Cmd ${HomeProject}/bin"
+_Cmd="$_Cmd ${HomeProject}/bin_shared"
+_Cmd="$_Cmd ${HomeProject}/cfg"
+_Cmd="$_Cmd ${HomeProject}/doc"
+_Cmd="$_Cmd ${HomeProject}/src"
+$_Cmd > ${HomeProject}/out/sloccount.sc

sample/Python/cfg/nose.cfg

+[nosetests]
+cover-erase=1
+cover-tests=1
+nocapture=1
+verbosity=3
+with-coverage=1
+with-id=1
+with-profile=1
+with-xcoverage=1
+with-xunit=1
+
+# NOTE:  Isolation conflicts with some other plugins, leave it off
+# with-isolation=1
+
+###############################################################################
+# TODO:  Using this functionality appears to need some serious research
+
+# TODO:  Set to the number of processor cores in the machine
+# processes=1
+
+# process-timeout is in seconds
+# process-timeout=60

sample/Python/cfg/pylintrc

+[MASTER]
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Profiled execution.
+profile=no
+
+# Add <file or directory> to the black list. It should be a base name, not a
+# path. You may set this option multiple times.
+#ignore=
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+
+[MESSAGES CONTROL]
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time.
+#enable=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifier separated by comma (,) or put this option
+# multiple time (only on the command line, not in the configuration file where
+# it should appear only once).
+#disable=
+
+
+[REPORTS]
+
+# Set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html
+output-format=parseable
+
+# Include message's id in output
+include-ids=yes
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells whether to display a full report or only the messages
+reports=yes
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (RP0004).
+comment=no
+
+
+[BASIC]
+
+# Required attributes for module, separated by a comma
+required-attributes=
+
+# List of builtins function names that should not be used, separated by a comma
+bad-functions=map,filter,apply,input
+
+# Regular expression which should only match correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression which should only match correct module level names
+# const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+const-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct method names
+method-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct instance attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct argument names
+argument-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct variable names
+# variable-rgx=[a-z_][a-z0-9_]{2,30}$
+# NOTE:  I am already disciplined enough to not use unusually-short variable
+# names, but sometimes they are handy and I don't want to fuss over them.
+variable-rgx=[a-z_][a-z0-9_]{0,30}$
+
+# Regular expression which should only match correct list comprehension /
+# generator expression variable names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Good variable names which should always be accepted, separated by a comma
+# good-names=i,j,k,ex,Run,_
+good-names=
+
+# Bad variable names which should always be refused, separated by a comma
+# bad-names=foo,bar,baz,toto,tutu,tata
+bad-names=
+
+# Regular expression which should only match functions or classes name which do
+# not require a docstring
+no-docstring-rgx=__.*__
+
+
+[FORMAT]
+
+# Maximum number of characters on a single line.
+max-line-length=79
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+# ignore-mixin-members=yes
+ignore-mixin-members=no
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+# ignored-classes=SQLObject
+ignored-classes=
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed.
+# generated-members=REQUEST,acl_users,aq_parent
+generated-members=
+
+
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+# min-similarity-lines=4
+min-similarity-lines=3
+
+# Ignore comments when computing similarities.
+# ignore-comments=yes
+ignore-comments=no
+
+# Ignore docstrings when computing similarities.
+# ignore-docstrings=yes
+ignore-docstrings=no
+
+
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+# init-import=no
+init-import=yes
+
+# A regular expression matching the beginning of the name of dummy variables
+# (i.e. not used).
+dummy-variables-rgx=_|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+# notes=FIX,FIXME,XXX,TODO
+notes=FIX,NOTE,RDW,RESEARCH,REVIEW,TODO
+
+
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
+
+
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+# ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+ignore-iface-methods=
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore
+# ignored-argument-names=_.*
+ignored-argument-names=
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branchs=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20

sample/configure_build_tools.bash

+#!/bin/bash
+
+echo 'INFO:  Configure build tools'
+
+[[   -z "$ParentBuildTools" ]] && \
+  echo 'FATAL: Missing value for $ParentBuildTools' && exit 1
+[[ ! -e "$ParentBuildTools" ]] && \
+  mkdir -p "$ParentBuildTools"
+[[ ! -d "$ParentBuildTools" ]] && \
+  echo "FATAL: Missing directory $ParentBuildTools" && exit 1
+[[   -z "$RevisionBuildTools" ]] && \
+  echo 'FATAL: Missing value for $RevisionBuildTools' && exit 1
+HomeBuildTools=$ParentBuildTools/$RevisionBuildTools
+[[   -z "$HomeBuildTools" ]] && \
+  echo 'FATAL: Missing value for $HomeBuildTools' && exit 1
+[[ ! -e "$HomeBuildTools" ]] && \
+  hg clone --rev "$RevisionBuildTools" "ssh://hg@bitbucket.org/robwilliams/build" "$HomeBuildTools"
+[[ ! -d "$HomeBuildTools" ]] && \
+  echo "FATAL: Missing directory $HomeBuildTools" && exit 1
+cd $HomeBuildTools
+hg fetch
+cd $HomeProject

setup.py

-from distutils.core import setup
-
-setup(
-    name='Build',
-    version='0.3',
-    author='Rob Williams',
-    author_email='Robert.David.Williams@gmail.com',
-    url='http://bitbucket.org/robwilliams/build/',
-    license='doc/LICENSE.txt',
-    description='Illustrate a Python build environment.',
-    long_description=open('README.txt').read(),
-)

src/example/__init__.py

-'''Marks a Python package'''

src/example/test/__init__.py

-'''Marks a Python package'''

src/example/test/dummy_test.py

-''' Dummy tests
-'''
-
-def test_pass():
-    '''Test nothing at all (well, "pass" anyway).'''
-    pass
-
-def test_true():
-    '''Test True.'''
-    assert True