Installing build procedure and framework
From DANSE
| Table of contents |
[edit]
Install Cygwin [this step is for windows only]
for CYGWIN...
- get the cygwin setup.exe from http://www.cygwin.com/
- run setup.exe
- choose "Disable Virus Scanner", "Install from Internet"
- install to "C:\Cygwin", with local package directory as "C:\CygwinInstall"
- select your internet connect type
- choose a download site (i.e. http://mirrors.kernel.org)
- use all of the default settings (you can install more later)
- download and install packages
[edit]
Install C compiler (and GNU make)
for CYGWIN...
- repeat 1.2-1.6 for Cygwin (above)
- from "Devel", select: "gcc", "gcc-g++", "make"
- download and install packages
for LINUX...
- most Linux distributions have both 'gcc', 'g++', and 'make' installed, however if they aren't or a newer version is desired...
- NOTE: it may also be necessary to install 'libgcc'
- 'gcc' and 'g++' can be obtained at:
- http://gcc.gnu.org
- http://packages.debian.org/stable/devel/gcc
- http://packages.debian.org/stable/devel/g++
- http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS
- http://fr.rpmfind.net/linux/rpm2html/search.php?query=gcc
- http://fr.rpmfind.net/linux/rpm2html/search.php?query=gcc-c%2B%2B
- 'make' can be obtained at:
- install 'gcc', 'g++', and 'make' from source, rpm, deb, or as your linux system requires...
- ---instructions need improvement--- (contributions, anyone?)
for MAC...
- most Mac distributions have both 'gcc', 'g++', and 'make' installed, however if they aren't or a newer version is desired...
- NOTE: it may also be necessary to install 'libgcc'
- 'gcc' and 'g++' can be obtained at:
- http://gcc.gnu.org
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- 'make' can be obtained at:
- http://www.gnu.org/software/make
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- install 'gcc', 'g++', and 'make' from source, dmg, hqx, or as your mac system requires...
- ---instructions need improvement--- (contributions, anyone?)
[edit]
Install Python
for CYGWIN...
- repeat 1.2-1.6 for Cygwin (above)
- from "Interpreters", select: "python"
- download and install packages
for LINUX...
- most Linux distributions have 'python' installed, however if it isn't or a newer version is desired...
- 'python' can be obtained at:
- install 'python' from source, rpm, deb, or as your linux system requires...
- 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.
- ---instructions need improvement--- (contributions, anyone?)
for MAC...
- most Mac distributions have 'python' installed, however if it isn't or a newer version is desired...
- 'python' can be obtained at:
- http://python.org/download
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- install 'python' from source, dgm, hqx, or as your mac system requires...
- 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.
- ---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!
[edit]
Install system support packages (cvs, ssh, ...)
for CYGWIN...
- repeat 1.2-1.6 for Cygwin (above)
- from "Devel", select: "cvs"
- from "Editors", select: "vim" (or "emacs")
- from "Net", select: "openssh"
- from "Utils", select: "clear"
- from "X11", select: "xterm", "xwinmw", "X-startup-scripts"
- download and install packages
for LINUX...
- most Linux distributions have 'cvs', 'ssh', and 'vim' (or 'emacs') installed, however if they aren't or a newer version is desired...
- 'cvs' can be obtained at:
- 'ssh' can be obtained at:
- http://www.openssh.com
- http://packages.debian.org/stable/net/ssh
- (http://packages.debian.org/stable/X11/ssh-askpass-gnome)
- http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS
- http://fr.rpmfind.net/linux/rpm2html/search.php?query=openssh
- (http://fr.rpmfind.net/linux/rpm2html/search.php?query=openssh-askpass-gnome)
- 'vim' can be obtained at:
- 'emacs' can be obtained at:
- install 'cvs', 'ssh', and 'vim' (or 'emacs') from source, rpm, deb, or as your linux system requires...
- ---instructions need improvement--- (contributions, anyone?)
for MAC...
- some Mac distributions have 'cvs', 'ssh', and 'vim' (or 'emacs') installed, however if they aren't or a newer version is desired...
- 'cvs' can be obtained at:
- http://www.gnu.org/software/cvs
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- 'ssh' can be obtained at:
- http://www.openssh.com
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- 'vim' can be obtained at:
- http://www.vim.org
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- 'emacs' can be obtained at:
- http://www.gnu.org/software/emacs/emacs.html
- http://fink.sourceforge.net/
- http://developer.apple.com/ [must register as an APPLE DEVELOPER]
- enhance carbon emacs can be found at http://www.inf.unibz.it/~franconi/mac-emacs/
- python highlighting is shown in http://shattered.teched.net/www.python.org/emacs/python-mode/installation.html
- install 'cvs', 'ssh', and 'vim' (or 'emacs') from source, dgm, hqx, or as your mac system requires...
- ---instructions need improvement--- (contributions, anyone?)
[edit]
Configure shell environment
for CYGWIN...
- download "bashrc.cygwin" and "bash_profile.cygwin" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- start cygwin
- start xterm [this shell allows cut-n-paste]
- $ startx
- use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.cygwin" and "bash_profile.cygwin"
- $ vim ~/.bashrc ~/.bash_profile
- activate changes
- $ source ~/.bash_profile
for LINUX...
- 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
- download "bashrc.linux" and "bash_profile.linux" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.linux" and "bash_profile.linux"
- $ vim ~/.bashrc ~/.bash_profile
- activate changes
- $ source ~/.bash_profile
for MAC...
- 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
- download "bashrc.mac" and "bash_profile.mac" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- use vim or emacs to edit ~/.bashrc and ~/.bash_profile to resemble downloaded "bashrc.mac" and "bash_profile.mac"
- $ vim ~/.bashrc ~/.bash_profile
- activate changes
- $ source ~/.bash_profile
[edit]
Configure pyre environment settings (~/.tools) file
for CYGWIN...
- download "bash_tools.cygwin" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.cygwin"
- $ vim ~/.tools
- activate changes
- $ source ~/.tools
for LINUX...
- the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitution in the instructions below:
- bash_tools.linux ==> csh_tools.linux
- download "bash_tools.linux" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.linux"
- $ vim ~/.tools
- activate changes
- $ source ~/.tools
for MAC...
- the following assumes $SHELL='bash'. However if $SHELL='csh', make the following substitution in the instructions below:
- bash_tools.mac ==> csh_tools.mac
- download "bash_tools.mac" from http://www.its.caltech.edu/~mmckerns/DANSE/INSTALL
- use vim or emacs to create ~/.tools that resembles downloaded "bash_tools.mac"
- $ vim ~/.tools
- activate changes
- $ source ~/.tools
[edit]
Setup framework and build procedure
- create development directory
- $ mkdir -p $DV_DIR
- create tools directory
- $ mkdir -p $TOOLS_DIR
- create builds directory
- $ mkdir -p $BLD_ROOT
- change to development directory
- $ cd $DV_DIR
- 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
- $ cvs -d :pserver:config@cvs.cacr.caltech.edu:/config login
- change to pythia directory
- $ cd $PYTHIA_DIR
- build framework
- $ mm
- change to templates directory
- $ cd $TEMPLATES_DIR
- build templates
- $ mm
[edit]
Testing your installation
- change to home directory
- $ cd
- build a template pyre application
- $ app.py
- "simple.py" is built!
- change to pyre tests directory
- $ cd $PYTHIA_DIR/packages/pyre/tests/applications
- run the hello.py test
- $ python hello.py
- "hello.py" says hello!
