Installing 4Suite 1.0b1 as non-root

Update: How could I have forgotten --enable-unicode=ucs4 in the Python build instructions?

Just gathering up some details on how to install 4Suite as non-root (i.e. in a user's home directory). This is based on experience installing on Red Hat and Fedora Core, but should work for most POSIX environments.

If you don't have Python installed (or want your own copy):

Grab Python-2.3.x.tgz or Python-2.4.x.tgz and unpack:

tar zxvf ~/dl/Python-2.3.5.tgz
cd Python-2.3.5/
./configure --prefix=$HOME/lib --enable-unicode=ucs4

Pick whatever prefix works for you. --enable-unicode=ucs4 is essential IMO if you're doing XML processing.

make && make install
ln -s $HOME/lib/bin/python $HOME/bin

The last step is to put the Python exe you just built into your $PATH, presumably before any other Python exe in the system.

Now for 4Suite

Grab 4Suite 1.0b1

cd $DOWNLOADS
tar zxvf 4Suite-1.0b1.tar.gz
cd 4Suite-1.0b1
python setup.py config --prefix=$HOME/lib
python setup.py install

Notice the extra "setup.py config" step. This is the key to the whole thing. The "setup.py config" sets the location for all the files installed by 4Suite except for the Python library files, which are installed to the location determined by the Python executable used to invoke the setup script. For more on where 4Suite puts things, see Mike Brown's excellent document "4Suite Installation Locations".

There is also a --home option to setup.py config, but do not use this unless you really know what you're doing. Stick to --prefix.

Finally you may want to make a link for all the 4suite commands to your home's bin directory

ln -s $HOME/lib/bin/4* $HOME/bin

Now you can run the tests.

cd $HOME/lib/lib/4Suite

Remember that this is beta software, and some test failures are to be expected (heck, I'd be amazed if there weren't some test failures with the full 1.0 release).

[Uche Ogbuji]

via Copia
2 responses
From my experience, just --prefix=$HOME works quite well.  It only adds ~/bin, ~/include, ~/lib and ~/man to your home directory.



Those can be integrated into the environment like this (possibly in .bashrc if that's your shell):

export PATH=$HOME/bin:$PATH

export CFLAGS="-I$HOME/include ${CFLAGS}"

export MANPATH=$HOME/man:$(manpath)
I used to do it with --prefix=$HOME, but 4Suite isn't the only package I build for my home directory, and not all packages are so lightweight in directory pollution (take Apache 2, for example).  Since I prefer to have some of the packages tamed in $HOME/lib, I choose to put all packages there, including Python and 4Suite.



But Jeremy's right that --prefix=$HOME should work fine for a good number fo folks.