1.3. Using SCons Without Installing

You don't actually need to "install" SCons to use it. Nor do you need to "build" it, unless you are interested in producing the SCons documentation, which does use several tools to produce HTML, PDF and other output formats from files in the source tree. All you need to do is call the scons.py driver script in a location that contains an SCons tree, and it will figure out the rest. You can test that like this:

$ python /path/to/unpacked/scripts/scons.py --version
    

To make use of an uninstalled SCons, the first step is to download either the scons-4.6.0.tar.gz or scons-4.6.0.zip, which are available from the SCons download page at https://scons.org/pages/download.html. There is also a scons-local bundle you can make use of. It is arranged a little bit differently, with the idea that you can include it with your own project if you want people to be able to do builds without having to download or install SCons. Finally, you can also use a checkout of the git tree from GitHub at a location to point to.

Unpack the archive you downloaded, using a utility like tar on Linux or UNIX, or WinZip on Windows. This will create a directory called scons-4.6.0, usually in your local directory. The driver script will be in a subdirectory named scripts, unless you are using scons-local, in which case it will be in the top directory. Now you only need to call scons.py by giving a full or relative path to it in order to use that SCons version.

Note that instructions for older versions may have suggested running python setup.py install to "build and install" SCons. This is no longer recommended (in fact, it is not recommended by the wider Python packaging community for any end-user installations of Python software). There is a setup.py file, but it is only tested and used for the automated procedure which prepares an SCons bundle for making a release on PyPI, and even that is not guaranteed to work in future.