1.5. pewma.py

pewma.py is a Python script that let you run some or all of the setup, materialize, build and create product steps from the command line.

pre-requisites: Python 2.7+, and Buckminster Headless.

1.5.1. Install pewma.py

Simply download pewma.py. If you need to do this using the Linux command line, try:

wget --tries=1 --timeout=5 --no-cache "https://alfred.diamond.ac.uk/buckminster/software/pewma.py"

If a network proxy is required, make sure it is defined first (i.e. $http_proxy is set).

1.5.2. Run pewma.py

Help text is available by specifying the --help option. For usage examples, see the Reference Guide.

pewma.py --help
Usage: pewma.py [options] action [arguments ...]

For more information, see the Infrastructure guide at https://alfred.diamond.ac.uk/documentation/

Options:
  Workspace options:
    -w <dir>, --workspace=<dir>               Workspace location (default: (None))
    --delete                                  First completely delete current workspace/ and workspace_git/
    --recreate                                First completely delete current workspace/, but keep any workspace_git/

  Materialize options:
    --directories.groupname=<groupname>       Linux group to set on directories that are created (default: dls_dasc)
    -l <location>, --location=<location>      Download location ("diamond" or "public")
    -k <path>, --keyring=<path>               Keyring file (for subversion authentication)
    --materialize.properties.file=<path>      Properties file, relative to workspace if not absolute (default:
                                              materialize-properties.txt)
    --maxParallelMaterializations=<value>     Override Buckminster default
    --maxParallelResolutions=<value>          Override Buckminster default

  Get-branches-expected options:
    --cquery.branches.file=<path>             Report file, relative to current directory if not absolute (default:
                                              cquery-branches-file.txt)

  Build/Product options:
    --scw, --suppress-compile-warnings        Don't print compiler warnings
    --assume-build                            Skip explicit build when running "site.p2" or "product" actions
    --recreate-symlink                        Create or update the "client" symlink to the built product (linux64 only)
    --buckminster.properties.file=<path>      Properties file, relative to site project if not absolute (default:
                                              filenames looked for in order: buckminster.properties,
                                              buckminster.beamline.properties)
    --buckminster.root.prefix=<path>          Prefix for buckminster.output.root and buckminster.temp.root properties

  Test/Corba options:
    --include=<pattern>,<pattern>,...         Only process plugin names matching one or more of the glob patterns
    --exclude=<pattern>,<pattern>,...         Do not process plugin names matching any of the glob patterns
    --GDALargeTestFilesLocation=              Default: /dls_sw/dasc/GDALargeTestFiles/

  General options:
    -D key=value                              Pass a system property to Buckminster or Ant
    -J key=value                              Pass an additional JVM argument
    -h, --help                                Show help information and exit
    -n, --dry-run                             Log the actions to be done, but don't actually do them
    -s <path>, --script-file=<path>           Script file, relative to workspace if not absolute (default: pewma-script.txt)
    -q, --quiet                               Be less verbose
    --log-level=<level>                       Logging level (default: INFO)
    --skip-proxy-setup                        Don't define any proxy settings

  Git options:
    -p, --prefix                              Prefix first line of git command output with the repo directory name.

Actions and Arguments:
    setup [<category> [<version>] | <cquery>]
      Set up a new workspace, with the target platform defined, but otherwise empty
      (parameters are the same as for the "materialize" action)
    materialize <component> [<category> [<version>] | <cquery>]
      Materialize a component and its dependencies into a new or existing workspace
      Component can be abbreviated in many cases (eg just the beamline name is sufficient)
      Category can be one of "gda/ida/dawn/none/training/gda-training"
      Version defaults to master
      CQuery is only required if you need to override the computed value
    get-branches-expected <component> [<category> [<version>] | <cquery>]
      Determine the CQuery to use, and return from it a list of repositories and branches
    gerrit-config
      Switch applicable repositories to origin Gerrit and configure for Eclipse
    git <command>
      Issue "git <command>" for all git clones
    clean
      Clean the workspace
    bmclean <site>
      Clean previous buckminster output
    build
      [alias for buildthorough]
    buildthorough
      Build the workspace (do full build if first incremental build fails)
    buildinc
      Build the workspace (incremental build)
    target
      List target definitions known in the workspace
    target path/to/name.target
      Set the target platform for the workspace
    sites
      List the available site projects in the workspace
    site.p2 <site>
      Build the workspace and an Eclipse p2 site
      Site can be omitted if there is just one site project, and abbreviated in most other cases
    site.p2.zip <site>
      Build the workspace and an Eclipse p2 site, then zip the p2 site
      Site can be omitted if there is just one site project, and abbreviated in most other cases
    product <site> [ <platform> ... ]
      Build the workspace and an Eclipse product
      Site can be omitted if there is just one site project, and abbreviated in most other cases
      Platform can be something like linux64/mac64/win64/all (defaults to current platform)
    product.zip <site> [ <platform> ... ]
      Build the workspace and an Eclipse product, then zip the product
    tests-clean
      Delete test output and results files from JUnit/JyUnit tests
    junit-tests
      Run Java JUnit tests for all (or selected) projects
    jyunit-tests
      Runs JyUnit tests for all (or selected) projects
    all-tests
      Runs both Java and JyUnit tests for all (or selected) projects
    corba-make-jar
      (Re)generate the corba .jar(s) in all or selected projects
    corba-validate-jar
      Check that the corba .jar(s) in all or selected plugins match the source
    corba-clean
      Remove temporary files from workspace left over from corba-make-jar