Code Monkey home page Code Monkey logo

scons-contrib's Introduction

SCons - a Software Construction Tool

IRC

Sourceforge Monthly Downloads

Sourceforge Total Downloads

Travis CI build status

AppVeyor CI build Status

CodeCov Coverage Status

Github Actions

What is SCons?

SCons is an Open Source software construction tool which orchestrates the construction of software (and other tangible products such as documentation files) by determining which component pieces must be built or rebuilt and invoking the necessary commands to build them.

Features:

  • Configuration files are Python scripts -use the power of a real programming language to 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-defined dependency 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 languages or 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 running simultaneously 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 or reordering 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 to work 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

Documentation for SCons is available at http://www.scons.org/documentation.html.

Latest Version

If you already have SCons installed, you can check that the package you have is the latest version at the SCons download page.

Execution Requirements

Running SCons requires Python 3.6 or higher. There should be no other dependencies 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 packages to be installed - at the moment the Ninja feature requires the supporting ninja package.

The default SCons configuration assumes use of the Microsoft Visual C++ compiler suite on Win32 systems, and assumes a C compiler named cc, a C++ compiler named c++, and a FORTRAN compiler named gfortran (such as found in the GNU Compiler Collection) on any other type of system. You may override these default values by appropriate configuration of variables in a Construction Environment, or in the case of Cygwin on a Win32 system, by selecting the 'cygwin' platform, which will set some of those Construction Variables for you.

By default, SCons knows how to search for available programming tools on various systems - see the SCons man page for details. You can override the default SCons choices made by appropriate configuration of construction variables.

Installation Requirements

SCons has no installation dependencies beyond a compatible version of Python. The tools which will be used to actually construct the project, such as compilers, documentation production tools, etc. should of course be installed by the appropriate means.

Installation

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 you just use scons as a command and not worry about things. In this case, we usually suggest using a virtualenv, to isolate the Python environment 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 via pip puts an executable scons.exe in the script directory of the Python installation, or in a shadow script directory if you did a User Install. To run scons as a command, you'll need this in your search path.

Fortunately, pip will warn you about this - pay attention to any messages during installation like this:

WARNING: The scripts scons-configure-cache.exe, scons.exe and sconsign.exe
are 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 version of SCons. Some distributions keep up to date with SCons releases very quickly, while others may delay, so the version of SCons you want to run may factor into your choice.

Getting Started Using SCons

If you're new to SCons, the first couple of chapters of the SCons User Guide provide an excellent starting spot.

Contributing to SCons

Please see CONTRIBUTING.rst

License

SCons is distributed under the MIT license, a full copy of which is available in the LICENSE file.

Reporting Bugs

The SCons project welcomes bug reports and feature requests.

Please make sure you send email with the problem or feature request to the SCons users mailing list, which you can join at https://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 the community has confirmed that it is either a new bug or a duplicate of an existing 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 workarounds for the problem you've run into, on the GitHub issue tracker.

Bug-fix Policy

At this time, the application of bug-fix pull requests normally happens at the head of the main branch. In other words fixes are likely to appear in the next regular release and there probably won't be a bugfix update to a past release. Consumers are of course free to internally maintain releases on their own by taking submitted patches and applying them.

Mailing Lists and Other Contacts

In addition to the scons-users list, an active mailing list for developers of SCons is available. You may send questions or comments to the list at [email protected].

You may subscribe to the developer's mailing list using the form at https://two.pairlist.net/mailman/listinfo/scons-dev. The same page contains archives of past postings.

Subscription to the developer's mailing list is by approval. In practice, no one is refused list membership, but we reserve the right to limit membership in the future and/or weed out lurkers.

There are other ways to contact the SCons community. An active Discord server is the most direct. The server includes a channel for code notifications and other GitHub events (#github-update), if those are of interest. See the website for more contact information: https://scons.org/contact.html.

Donations

If you find SCons helpful, please consider making a donation (of cash, software, or hardware) to support continued work on the project. Information is available at https://www.scons.org/donate.html or the GitHub Sponsors button on https://github.com/scons/scons.

Reproducible Builds

In order to suppor those users who which to produce reproducible builds (https://reproducible-builds.org/specs/source-date-epoch/) we're now including logic to force SCons to propagate SOURCE_DATE_EPOCH from your shell environment for all SCons builds to support reproducible builds we're now providing an example site_init.py and a script to install it in your ~/.scons. See packaging/etc/README.txt for more info

For More Information

Check the SCons web site at https://www.scons.org/

Author Info

SCons was originally written by Steven Knight, knight at baldmt dot com. Since around 2010 it has been maintained by the SCons development team, co-managed by Bill Deegan and Gary Oberbrunner, with many 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

scons-contrib's People

Contributors

bdbaddog avatar brgirgis avatar carandraug avatar danmcnaul avatar dirkbaechle avatar dsiroky avatar esoha-nvidia avatar kprussing avatar manuelnaranjo avatar mwichmann avatar rryan avatar russel avatar silex avatar tanjeff avatar williamblevins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scons-contrib's Issues

Cuda tool not supported on python 3

Hi,
when trying to use the cuda tool, I got:

File "scons-contrib/sconscontrib/SCons/Tool/cuda/__init__.py", line 91

    print 'scons: CUDA Toolkit found in ' + path

          ^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('scons: CUDA Toolkit found in ' + path)?

While I can patch this myself, I wonder what are the general plans regarding Python 3 support

cpython tool is well out of date

The tool knows how to make a .pyc or .pyo file, depending on a construction variable $CPYTHON_PYC. However:

PEP 3147 introduced .pyc directories and versioning as of Python 3.2. That is, instead of foo.py being compiled to foo.pyc, it by default becomes __pycache__/foo.cpython-311.pyc IFF the compiler version is CPython 3.11.

Then PEP 488 eliminated pyo files entirely as of Python 3.5. They now use an encoding on the .pyc filename, so that foo.py compiled with optimization level 1 yields a filename __pycache__/foo.cpython-311.opt-1.pyc by default.

To be useful in a modern Python environment, those changes need to be accounted for.

qt4 issue with missing 2 required positional arguments

We just upgraded to scons-4.3.0 (using python-3.10.2) and also updated the qt4 tool as well. I'm getting many errors such as:

scons: *** [build/linux_x86_64_rhel7/Optimized/gui/moc_GUBase.cc] TypeError `_defines() missing 2 required positional arguments: 'target' and 'source'' trying to evaluate `${_defines(QT4_MOCDEFPREFIX, CPPDEFINES, QT4_MOCDEFSUFFIX, __env__)}'

Is there something obvious that I can fix? We are using qt-4.8.7.

Porting issues

A simpleminded test with just creating an env specifying the tool showed some issues with the current contrib set:

The following tools have the problem with the transition from SCons.Warnings.Warning to SCons.Warnings.SConsWarning: gob2, IDL, jal, kotlin, noweb, ProC, rest. Plus, from local branches, not merged yet - qt4/qt5 have the same issue.

These other tools failed due to missing Python modules:

lyx:

KeyError: 'PDF': from
...
  File "/home/mats/Work/scons.contrib/contrib/site_scons/site_tools/lyx/__init__.py", line 79:
    env["BUILDERS"]["PDF"].add_src_builder(lyx_builder

sip:

ModuleNotFoundError: No module named 'sipconfig':
...
  File "/home/mats/Work/scons.contrib/contrib/site_scons/site_tools/sip/__init__.py", line 57:
    import sipconfig

sphinx4scons:

ModuleNotFoundError: No module named 'sphinx.util':
...
  File "/home/mats/Work/scons.contrib/contrib/site_scons/site_tools/sphinx4scons/__init__.py", line 54:
    from sphinx.util.matching import patfilter, compile_matchers

sconscontrib not queryable from pypi

The package sconscontrib is not currently installable from pip:

$ pip search sconscontrib -v
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "POST /pypi HTTP/1.1" 200 108

Pypi query

add scons-perl5 tool to scons-contrib

On Tue, 9 Jun 2020 at 08:34, Dirk Bächle wrote:

Hi Carnë,

On 09.06.20 01:55, Carnë Draug wrote:

On Mon, 8 Jun 2020 at 22:17, Dirk Bächle wrote:

[...]

I'm glad to hear you're interested on it.  I'm not maintaining the
SCons-perl5 tool anymore.  If you are willing to take it over to
scons-contrib, you're welcome to do so.

I have already made the conversion to git and merged it in the
scons-contrib repo, just pull my master branch from
https://github.com/carandraug/scons-contrib

can I ask you to also create the pull request against
SCons/scons-contrib for it? I could probably do this myself, but it
might look as if I'm "robbing" the Tool from you. ;)
Having you initiate the merge gives us maintainers (me in this case)
less to explain down the road, I guess.

Thanks a lot for contributing to the SCons project!

The reason I didn't made a pull request was that I already made the merge on the master branch. It's already finalized so I see no point on starting a pull request for you to finish it and have github adding pointless merge commit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.