Question

Can you please tell me how can I install scons on MacOSX?

I don't see a mac specified download from http://www.scons.org/

Thank you.

Was it helpful?

Solution

Download the tarball and then refer to the first chapter of the user guide, Building and Installing SCons. In short:

# cd scons-1.2.0
# python setup.py install

OTHER TIPS

An alternative to MacPorts would be to use HomeBrew, where you'd just to

brew install scons

Install MacPorts, then at the Terminal (Applications > Utilities > Terminal.app), type:

sudo port install scons

This command will automatically download and install scons for you. MacPorts requires that you have the developer tools installed, so if you don't, you will need to download and install the Xcode 3 DVD.

NOTE 1: Xcode 2.5 is the last version of Xcode that will work on Mac OS X Tiger.

NOTE 2: This may seem awfully painful if you don't already have MacPorts installed. However, you really should go this route, as MacPorts makes it easy to update installed software, it automatically manages dependencies between software, and it makes it easier to install other packages in the future.

If you have the Python setuptools, the following will install scons-1.2.0 from sourceforge:

easy_install scons

But bear in mind the issues people raise with setuptools.

Also, keep in mind this question and the answers about virtualenv and pip for isolating Python environments.

There is also a GUI installer for SCons on Mac OS X that I wrote available for download here:

https://github.com/rviney/scons-mac-installer

Since version 2.3.0 SCons should work without installing:

# get the source and switch to stable 2.3.0 version
hg clone https://bitbucket.org/scons/scons/ -r 2.3.0

# make sure to use Python 2 for now
python scons/src/scripts/scons.py

When running 2.3.0 from source, the SCons.__version__ is not set correctly, so EnsureSConsVersion() will likely to fail if that's ok for you.

pull down SCons source and put it in /Library/Python/X.X/. Make sure you have the dir structure like this: /Library/Python/X.X/SCons/init.py

remember, import searches for modules, and /Library/Python/XXX is by default in the search path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top