GalSim-developers/GalSim — pull request #246 by rmjarvis (2012-09-11 01:42:56+00:00)
Title: #127 Improve installation procedure

I'd like everyone possible to test this pull request, since I want to make sure I didn't break anyone's current installation in my attempt to make it work more generally. So please do:
```
git checkout '#127'
scons
scons install
scons tests
```
and report any errors you find.

Summary of changes:

- The python tests now use non-embedded python calls, rather than use the internal SCons version of python. This means you no longer need to make sure the SCons was build using the same version of python as the one you want to use for GalSim.
- You can specify what version of python you want with `scons PYTHON=/path/to/python`. (The default is `/usr/bin/env python`.)
- When it builds the python module, it will now only include the python library if it doesn't work without it. I think only Macs require the python library to be included. So the linux systems that hadn't worked before because the python library was static should now work.
- The various `.py` scripts we had in the bin and examples directory are no longer executables with `#!/usr/bin/env python` at the top. Rather, the installation process creates versions (without the `.py` ending) that have the right shebang at the top, according to the specified python version. These are put in the bin directory.
- There is another new SCons option `NOSETESTS=/path/to/nosetests` which may be required if the version of nosetests in your path uses a different python than you specify with the PYTHON option.
- I made our bundled boost random stuff work when the native boost library is version 1.35 (the latest boost version available on fink that uses the fink python rather than system python).

One of the results of this process is that it is now possible to get all of our prerequisites from fink. This is required if we want to eventually put GalSim itself on fink. The fink modules I used are:
- python27
- numpy-py27
- pyfits-py27
- nose-py27
- yaml-py27
- boost1.35-python27
- tmv0
- fftw3

After these are installed, the following series of commands should all work (from a clean GalSim directory):
```
scons PYTHON=/sw/bin/python2.7 PREFIX=/sw
sudo scons install
scons tests NOSETESTS=/sw/bin/nosetests
cd examples
./check_yaml
```