Wire-Cell News

Updates from the Wire-Cell team.

Build system cleanup

The Waf-based build system for the toolkit is recently cleaned up and expanded to support user packages. For existing users this change should be invisible. This post gives the details of the change, what to do when updates to the build system are needed and how to use it for to build your own WCT-related packages.

Consolidation and cleanup

Previously, the waf-tools repository was available under a similarly named subpackage in the toolkit source. This repository holds add-on tools to Waf to build WCT packages and locate its software dependencies. The contents of this package are still relevant but they are now fully "baked" into the wcb build program and the waftools/ directory is now absent from the wire-cell-toolkit repositry. The bulk of the main wscript file has also been moved into waf-tools and baked into wcb.

Updating wcb

As a consequence of this consolidation, there is very little "guts" of the build system obviously exposed to the casual users or even developers. This makes the wcb and wscript easy to transfer and adapt to other WCT related packages (see next section) but means that when an update to the build system it needed the wcb program must itself be rebuilt.

Rebuilding wcb is easy (but very few people need to do it):

$ cd /path/to/your/waf-tools
$ ./refresh-wcb -o /path/to/your/wire-cell-toolkit/wcb

$ cd /path/to/your/wire-cell-toolkit
(...test...)
$ git commit -am "Refresh to wcb X.Y.Z" && git push

$ cd /path/to/your/waf-tools
$ git tag -am "...useful message..." X.Y.Z
$ git push --tags

Using wcb to build your own package

Using wcb to build WCT itself is unchanged. It is also possible to use wcb and start with the wscript file from WCT itself to easily create a build system for your won WCT-based packages. An example package has been created to give a, well, an example. You may use it as a starting point or simply for inspiration.

To use example-package as a starting point:

  1. download the source eg as a zip file (don't clone, or if you do, don't push changes)
  2. edit it's wscript file to select a unique name in bld.smplpkg()
  3. Add any additional WCT-provided dependencies in that function.
  4. Define any new dependencies at the top in the

wcb.package_descriptions dictionary and add them to the bld.smplpkg() function.