- Notifications
You must be signed in to change notification settings - Fork325
SCons - a software construction tool
License
MIT, Unknown licenses found
Licenses found
SCons/scons
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SCons is an Open Source software construction tool which orchestrates the construction of software(and other tangible products such as documentation files) by determining whichcomponent pieces must be built or rebuilt and invoking the necessarycommands to build them.
Features:
- Configuration files are Python scripts -use the power of a real programming languageto solve build problems; no complex domain-specific language to learn.
- Reliable, automatic dependency analysis built-in for C, C++ and FORTRAN.No more "make depend" or "make clean" to get all of the dependencies.Dependency analysis is easily extensible through user-defineddependency Scanners for other languages or file types.
- Built-in support for C, C++, D, Java, FORTRAN, Yacc, Lex, Qt and SWIG,and building TeX and LaTeX documents.Easily extensible through user-defined Builders for other languagesor file types.
- Building from central repositories of source code and/or pre-built targets.
- Built-in support for Microsoft Visual Studio, including generation of.dsp, .dsw, .sln and .vcproj files.
- Reliable detection of build changes using cryptographic hashes;optionally can configure other algorithms including traditional timestamps.
- Support for parallel builds - can keep multiple jobs runningsimultaneously regardless of directory hierarchy.
- Integrated Autoconf-like support for finding #include files, libraries,functions and typedefs.
- Global view of all dependencies - no more multiple build passes orreordering targets to build everything.
- Ability to share built files in a cache to speed up multiple builds.
- Designed from the ground up for cross-platform builds, and known towork on Linux, other POSIX systems (including AIX, BSD systems,HP/UX, IRIX and Solaris), Windows 7/8/10, MacOS, and OS/2.
- Written in Python.
Documentation for SCons is available athttp://www.scons.org/documentation.html.
If you already have SCons installed, you can check that the package you haveis the latest version at theSCons download page.
Running SCons requires Python 3.6 or higher. There should be no otherdependencies or requirements to run standard SCons.The last release to support Python 3.5 was 4.2.0.
Some experimental features may require additional Python packagesto be installed - at the moment the Ninja feature requires thesupportingninja package.
The default SCons configuration assumes use of the Microsoft Visual C++compiler suite on Win32 systems, and assumes a C compiler namedcc
, a C++compiler namedc++
, and a FORTRAN compiler namedgfortran
(such as foundin the GNU Compiler Collection) on any other type of system. You mayoverride these default values by appropriate configuration of variablesin a Construction Environment, or in the case of Cygwin on a Win32 system,by selecting the 'cygwin' platform, which will set some of those ConstructionVariables for you.
By default, SCons knows how to search for available programming tools onvarious systems - see theSCons man pagefor details. You can overridethe default SCons choices made by appropriate configuration ofconstruction variables.
SCons has no installation dependencies beyond a compatible versionof Python. The tools which will be used to actually construct theproject, such as compilers, documentation production tools, etc.should of course be installed by the appropriate means.
The preferred way to install SCons is through the Python installer,pip
(or equivalent alternatives, such as the Anaconda installer,conda
).You can install either from a wheel package or from the source directory.To work on a project that builds using SCons, installation lets youjust usescons
as a command and not worry about things. In thiscase, we usually suggest using a virtualenv, to isolate the Pythonenvironment to that project(some notes on that:Python Packaging User Guide: Creating and using virtual environments).
Some installation examples:
# to do a system-level install:$ python -m pip install --user scons# Windows variant, assuming Python Launcher:C:\Users\me> py -m pip install --user scons# inside a virtualenv it's safe to use bare pip:(myvenv) $ pip install scons# install in a virtualenv from a wheel file:(myvenv) $ pip install SCons-4.3.0-py3-none-any.whl# install in a virtualenv from source directory:(myvenv) $ pip install --editable .
Note that on Windows, SCons installed viapip
puts an executablescons.exe
in the script directory of the Python installation,or in a shadow script directory if you did a User Install.To runscons
as a command, you'll need this in your search path.
Fortunately,pip
will warn you about this - pay attention to anymessages during installation like this:
WARNING: The scripts scons-configure-cache.exe, scons.exe and sconsign.exeare installed in 'C:\Users\me\AppData\Roaming\Python\Python310\Scripts'which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning,use --no-warn-script-location.
If you are running on a system which uses a package manager(for example most Linux distributions), you may, at your option,use the package manager (e.g.apt
,dnf
,yum
,zypper
,brew
,pacman
etc.) to install a versionof SCons. Some distributions keep up to date with SCons releasesvery quickly, while others may delay, so the version of SConsyou want to run may factor into your choice.
If you're new to SCons, the first couple of chapters of theSCons User Guideprovide an excellent starting spot.
Please seeCONTRIBUTING.rst
SCons is distributed under the MIT license, a full copy of which is availablein theLICENSE file.
The SCons project welcomes bug reports and feature requests.
Please make sure you send email with the problem or feature request tothe SCons users mailing list, which you can join athttps://two.pairlist.net/mailman/listinfo/scons-users,or on the SCons Discord server in#scons-help.
Once you have discussed your issue on the users mailing list and thecommunity has confirmed that it is either a new bug or a duplicate of anexisting bug, then please follow the instructions the community provides(including the issue template presented by GitHub)to file a new bug or to add yourself to the CC list for an existing bug.
You can explore the list of existing bugs, which may include workaroundsfor the problem you've run into, on theGitHub issue tracker.
At this time, the application of bug-fix pull requestsnormally happensat the head of the main branch. In other words fixes are likely to appearin the next regular release and there probably won't be a bugfix updateto a past release. Consumers are of course free to internally maintainreleases on their own by taking submitted patches and applying them.
In addition to the scons-users list, an active mailing list for developersof SCons is available. You may send questions or comments to the listatscons-dev@scons.org.
You may subscribe to the developer's mailing list using the form athttps://two.pairlist.net/mailman/listinfo/scons-dev. The same pagecontains archives of past postings.
Subscription to the developer's mailing list is by approval. In practice, noone is refused list membership, but we reserve the right to limit membershipin the future and/or weed out lurkers.
There are other ways to contact the SCons community. An active Discordserver is the most direct. The server includes a channel for codenotifications and other GitHub events (#github-update
),if those are of interest. See the website for more contact information:https://scons.org/contact.html.
SCons itself is set up to do "reproducible builds"(see (https://reproducible-builds.org/specs/source-date-epoch/)if environment variablesSOURCE_DATE_EPOCH
is set - that is,fields in the package which could change each time the package isconstructed are forced to constant values.
To support other projects which wish to do the same, a sample scriptis provided which can be placed in a site directory, which importsSOURCE_DATE_EPOCH
and sets it in the execution environment ofevery created construction envirionment. There's also an installerscript (POSIX shell only). See packaging/etc/README.txt for more details.
If you find SCons helpful, please consider making a donation (of cash,software, or hardware) to support continued work on the project. Informationis available athttps://www.scons.org/donate.htmlor the GitHub Sponsors button onhttps://github.com/scons/scons.
Check the SCons web site athttps://www.scons.org/
SCons was originally written by Steven Knight, knight at baldmt dot com.Since around 2010 it has been maintained by the SConsdevelopment team, co-managed by Bill Deegan and Gary Oberbrunner, withmany contributors, including but not at all limited to:
- Chad Austin
- Dirk Baechle
- Charles Crain
- William Deegan
- Steve Leblanc
- Rob Managan
- Greg Noel
- Gary Oberbrunner
- Anthony Roach
- Greg Spencer
- Tom Tanner
- Anatoly Techtonik
- Christoph Wiedemann
- Russel Winder
- Mats Wichmann
... and many others.
Copyright (c) 2001 - 2024 The SCons Foundation
About
SCons - a software construction tool