hwaf

command module
v0.0.0-...-5465f73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2014 License: BSD-3-Clause Imports: 28 Imported by: 0

README

hwaf

Build Status

hwaf is a set of commands to ease developing against and with waf based projects, in High Energy Physics software.

hwaf is a Go binary produce by the Go toolchain

It is very much like Git in the sense that it is a multi sub-command binary with the ability to extend its functionalities via third-party sub-commands.

The typical workflow of somebody developing against some project:

# initialize hwaf. this has to be done the first time you install hwaf
hwaf self init

# initialize a local workarea
hwaf init work
cd work

# setup hwaf to use a given project
# the directory given to hwaf needs to hold a special
# 'project.info' metadata file
hwaf setup -p /opt/sw/mana/mana-core/<vers>/<variant>


# checkout a few packages
hwaf pkg co git://github.com/mana-fwk/mana-core-athenakernel Control/AthenaKernel
hwaf pkg co git://github.com/mana-fwk/mana-core-gaudikernel GaudiKernel

# configure (every time a new package has been added)
hwaf configure

# build+install
hwaf
hwaf install

# run a command from the build or the parent project(s)
hwaf run my-command --verbose

# spawn a sub-shell to run a command from the build or parent
# project(s)
# exit with ^D
hwaf shell
my-command --verbose
^D

# when in doubt, you can always get some help:
$ hwaf help
Usage:

	hwaf command [arguments]

The commands are:

    asetup      setup a workarea with Athena-like defaults
    init        initialize a new workarea
    setup       setup an existing workarea
    version     print version and exit
    waf         run waf itself
    configure   configure local project or packages
    build       build local project or packages
    check       build and run unit-tests for the local project or packages
    install     install local project or packages
    clean       clean local project or packages
    distclean   distclean local project or packages
    shell       run an interactive shell with the correct environment
    run         run a command with the correct (project) environment
    sdist       create a source distribution from the project or packages
    bdist       create a binary distribution from the project or packages
    bdist-deb   create a DEB from the local project/packages
    bdist-rpm   create a RPM from the local project/packages
    dump-env    print the environment on STDOUT

    git         hwaf related git tools
    pkg         add, remove or inspect sub-packages
    show        show informations about packages and projects
    pmgr        query, download and install projects
    self        modify hwaf internal state

Use "hwaf help [command]" for more information about a command.

Additional help topics:


Use "hwaf help [topic]" for more information about that topic.

Installation

There are 2 ways to install hwaf.

Installation using the Go toolchain

hwaf is a Go binary produced by the Go toolchain. If you haven't already a Go toolchain installed, you may want to look here for the detailed instructions. But a quick getting started guide could be:

# get the Go toolchain
$ curl -L -O https://code.google.com/go/downloads/....
# unpack somewhere, say, /usr/local/go
$ export GOROOT=/usr/local/go
$ export PATH=$GOROOT/bin:$PATH
$ which go
/usr/local/go/bin/go

# setup a development environment
$ export GOPATH=$HOME/gocode
$ export PATH=$GOPATH/bin:$PATH

then, you just have to do:

$ go get github.com/hwaf/hwaf

to get the latest hwaf tool installed (under $GOPATH/src/github.com/hwaf/hwaf) and ready.

Installation from binaries

Packaged up binaries for hwaf are also available here. Untar under some directory like so (for linux 64b):

$ mkdir local
$ cd local
$ curl -L \
  http://cern.ch/hwaf/downloads/tar/hwaf-20130926-linux-amd64.tar.gz \
  | tar zxf -
$ export HWAF_ROOT=`pwd`
$ export PATH=$HWAF_ROOT/bin:$PATH

If you are at CERN, binaries are installed here:

$ . /afs/cern.ch/atlas/project/hwaf/sw/install/hwaf-20130926/linux-amd64/setup-hwaf.sh

Documentation

Overview

hwaf manages hep-waf based applications and libraries.

Subcommands:

init [directory]

self-update

configure

build/make

install

bdist
bdist-rpm
bdist-dmg
bdist-deb

run

shell

setup

add-pkg <pkg-uri> [<pkg-version>]
checkout|co == alias(add-pkg)

Directories

Path Synopsis
Package platform provides informations about the current platform:
Package platform provides informations about the current platform:
plugins
Package vcs eases interactions with various Versioned Control Systems.
Package vcs eases interactions with various Versioned Control Systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL