I’m setting up django-compress, and incredibly helpful django tool for compressing media files. By default it requires the installation of CSSTidy which was not as smooth of a task as most. Here are my notes.
To install CSSTidy you have to have Scons in order to install it. Scons is similar to Make but uses python and probably has a ton of other differences as well. The following will install scons.
wget http://prdownloads.sourceforge.net/scons/scons-1.2.0.tar.gz tar -xzvf scons-1.2.0.tar.gz cd scons-1.2.0 sudo python setup.py install --standard-lib
I took me a short while to discover the need to use the –standard-lib flag. If you do not scons is not installed in the python path and you will get the following error when trying to install csstidy
scons: *** No SConstruct file found.
File “/usr/local/lib/scons-1.2.0/SCons/Script/Main.py”, line 826, in _main
wget http://downloads.sourceforge.net/csstidy/csstidy-source-1.4.zip?modtime=1184828155&big_mirror=0 unzip csstidy-source-1.4.zip scons sudo cp release/csstidy/csstidy /usr/local/bin/
Note that the last command assumes /usr/local/bin is in your $PATH. Change it if you would like to place it in another place.