Installing build procedure and framework

From DANSE

Table of contents

Install Cygwin [this step is for windows only]

for CYGWIN...

  1. get the cygwin setup.exe from http://www.cygwin.com/
  2. run setup.exe
  3. choose "Disable Virus Scanner", "Install from Internet"
  4. install to "C:\Cygwin", with local package directory as "C:\CygwinInstall"
  5. select your internet connect type
  6. choose a download site (i.e. http://mirrors.kernel.org)
  7. use all of the default settings (you can install more later)
  8. download and install packages


Install C compiler (and GNU make)

for CYGWIN...

  1. repeat 1.2-1.6 for Cygwin (above)
  2. from "Devel", select: "gcc", "gcc-g++", "make"
  3. download and install packages

for LINUX...

  1. most Linux distributions have both 'gcc', 'g++', and 'make' installed, however if they aren't or a newer version is desired...
  2. NOTE: it may also be necessary to install 'libgcc'
  3. 'gcc' and 'g++' can be obtained at:
  4. 'make' can be obtained at:
  5. install 'gcc', 'g++', and 'make' from source, rpm, deb, or as your linux system requires...
  6. ---instructions need improvement--- (contributions, anyone?)

for MAC...

  1. most Mac distributions have both 'gcc', 'g++', and 'make' installed, however if they aren't or a newer version is desired...
  2. NOTE: it may also be necessary to install 'libgcc'
  3. 'gcc' and 'g++' can be obtained at:
  4. 'make' can be obtained at:
  5. install 'gcc', 'g++', and 'make' from source, dmg, hqx, or as your mac system requires...
  6. ---instructions need improvement--- (contributions, anyone?)


Install Python

for CYGWIN...

  1. repeat 1.2-1.6 for Cygwin (above)
  2. from "Interpreters", select: "python"
  3. download and install packages

for LINUX...

  1. most Linux distributions have 'python' installed, however if it isn't or a newer version is desired...
  2. 'python' can be obtained at:
  3. install 'python' from source, rpm, deb, or as your linux system requires...
  4. most distributions of Linux split the 'python' source into several binary packages ('python', 'python-devel', 'python-tools', and 'tkinter'). If a binary install is chosen, it may be necessary to install all of the above-mentioned python packages.
  5. ---instructions need improvement--- (contributions, anyone?)

for MAC...

  1. most Mac distributions have 'python' installed, however if it isn't or a newer version is desired...
  2. 'python' can be obtained at:
  3. install 'python' from source, dgm, hqx, or as your mac system requires...
  4. some distributions of Mac split the 'python' source into two binary packages ('python' and 'tkinter'). If a binary install is chosen, it may be necessary to install both of the above-mentioned python packages.
  5. ---instructions need improvement--- (contributions, anyone?)
    • The latest Mac OS X Panther has python2.3 shipped with it. If it is not preinstalled, simply go to Applications-Installers and install Xcode tools, which will install a bunch of tools necessary for developers.
    • MacPython add-on for Panther is a good stuff. From which you can easily install readline, which is quite essential!


Install system support packages (cvs, ssh, ...)

for CYGWIN...

  1. repeat 1.2-1.6 for Cygwin (above)
  2. from "Devel", select: "cvs"
  3. from "Editors", select: "vim" (or "emacs")
  4. from "Net", select: "openssh"
  5. from "Utils", select: "clear"
  6. from "X11", select: "xterm", "xwinmw", "X-startup-scripts"
  7. download and install packages

for LINUX...

  1. most Linux distributions have 'cvs', 'ssh', and 'vim' (or 'emacs') installed, however if they aren't or a newer version is desired...
  2. 'cvs' can be obtained at:
  3. 'ssh' can be obtained at:
  4. 'vim' can be obtained at:
  5. 'emacs' can be obtained at:
  6. install 'cvs', 'ssh', and 'vim' (or 'emacs') from source, rpm, deb, or as your linux system requires...
  7. ---instructions need improvement--- (contributions, anyone?)

for MAC...

  1. some Mac distributions have 'cvs', 'ssh', and 'vim' (or 'emacs') installed, however if they aren't or a newer version is desired...
  2. 'cvs' can be obtained at:
  3. 'ssh' can be obtained at:
  4. 'vim' can be obtained at:
  5. 'emacs' can be obtained at:
  6. install 'cvs', 'ssh', and 'vim' (or 'emacs') from source, dgm, hqx, or as your mac system requires...
  7. ---instructions need improvement--- (contributions, anyone?)


Configure shell environment

for CYGWIN...

  1. download "bashrc.cygwin" and "bash_profile.cygwin" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  2. start cygwin
  3. start xterm [this shell allows cut-n-paste]
    • $ startx
  4. use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.cygwin" and "bash_profile.cygwin"
    • $ vim ~/.bashrc ~/.bash_profile
  5. activate changes
    • $ source ~/.bash_profile

for LINUX...

  1. the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitutions in the instructions below:
    • bashrc.linux ==> cshrc.linux
    • bash_profile.linux ==> csh_login.linux
    • .bashrc ==> .cshrc
    • .bash_profile ==> .login
  2. download "bashrc.linux" and "bash_profile.linux" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  3. use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.linux" and "bash_profile.linux"
    • $ vim ~/.bashrc ~/.bash_profile
  4. activate changes
    • $ source ~/.bash_profile

for MAC...

  1. the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitutions in the instructions below:
    • bashrc.mac ==> cshrc.mac
    • bash_profile.mac ==> csh_login.mac
    • .bashrc ==> .cshrc
    • .bash_profile ==> .login
  2. download "bashrc.mac" and "bash_profile.mac" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  3. use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.mac" and "bash_profile.mac"
    • $ vim ~/.bashrc ~/.bash_profile
  4. activate changes
    • $ source ~/.bash_profile


Configure pyre environment settings (~/.tools) file

for CYGWIN...

  1. download "bash_tools.cygwin" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  2. use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.cygwin"
    • $ vim ~/.tools
  3. activate changes
    • $ source ~/.tools

for LINUX...

  1. the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitution in the instructions below:
    • bash_tools.linux ==> csh_tools.linux
  2. download "bash_tools.linux" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  3. use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.linux"
    • $ vim ~/.tools
  4. activate changes
    • $ source ~/.tools

for MAC...

  1. the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitution in the instructions below:
    • bash_tools.mac ==> csh_tools.mac
  2. download "bash_tools.mac" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
  3. use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.mac"
    • $ vim ~/.tools
  4. activate changes
    • $ source ~/.tools


Setup framework and build procedure

  1. create development directory
    • $ mkdir -p $DV_DIR
  2. create tools directory
    • $ mkdir -p $TOOLS_DIR
  3. create builds directory
    • $ mkdir -p $BLD_ROOT
  4. change to development directory
    • $ cd $DV_DIR
  5. use anonymous cvs to get build procedure and framework
    • $ cvs -d :pserver:config@cvs.cacr.caltech.edu:/config login
      [password: config]
    • $ cvs -d :pserver:config@cvs.cacr.caltech.edu:/config co config
    • $ cvs -d :pserver:pyre@cvs.cacr.caltech.edu:/pyre login
      [password: pyre]
    • $ cvs -d :pserver:pyre@cvs.cacr.caltech.edu:/pyre co pythia-0.8
    • $ cvs -d :pserver:pyre@cvs.cacr.caltech.edu:/pyre co templates
  6. change to pythia directory
    • $ cd $PYTHIA_DIR
  7. build framework
    • $ mm
  8. change to templates directory
    • $ cd $TEMPLATES_DIR
  9. build templates
    • $ mm


Testing your installation

  1. change to home directory
    • $ cd
  2. build a template pyre application
    • $ app.py
    • "simple.py" is built!
  3. change to pyre tests directory
    • $ cd $PYTHIA_DIR/packages/pyre/tests/applications
  4. run the hello.py test
    • $ python hello.py
    • "hello.py" says hello!
Personal tools
Document Uploads/Links