views:

522

answers:

2

Hi,

I am on OS X + Python 2.6 + django 1.1.

I have tried all possible solution available on the net i.e.

http://thingsilearned.com/2009/01/02/installing-csstidy-and-scons-on-os-x-or-linux/

tried with python 2.5, 2.4 apple-python.. I just can't go past this error after installing scons

$ /usr/local/bin/scons

scons: *** No SConstruct file found. File "/Library/Python/2.5/site-packages/SCons/Script/Main.py", line 829, in _main

I need csstidy for django-compress (yes I can turn that function off but why?) I mean the maintainer must see some value to have it in default and he knows better.

Unfortunately there is no port for csstidy...

+3  A: 

Don't know if you managed to give up or not, or if you solved it.

For anybody who is still having trouble building CSSTidy, here was my solution. If you follow the tutorial in the URL linked above, there is one horrible error in it that I didn't realize until about an hour later.

$ wget http://downloads.sourceforge.net/csstidy/csstidy-source-1.4.zip?modtime=1184828155&big_mirror=0  
$ unzip csstidy-source-1.4.zip  
$ cd csstidy <<-- THIS IS WRONG. SConstruct isn't here. D:
$ scons  
$ sudo cp release/csstidy/csstidy /usr/local/bin/

The errors the author ran into had nothing to do with the --standard-lib flag. When you unzip, the files don't get put into a subdirectory like tar usually does. So the SConstruct file that's magically missing is actually in the directory above csstidy, wherever you ran unzip in the first place.

Once I found that out, I saw the SConstruct file and was able to build it by running scons.

Bryan Veloso
A: 

If you just want to build csstidy and don't care about incremental builds, just do this:

g++ *.cpp -o csstidy

Shawn Hyam