summaryrefslogtreecommitdiffstats
path: root/README
blob: 96627c944c01567e351d2cf467fd5770ed3a8b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# Copyright (c) 2001, 2002, 2003 Steven Knight

                 SCons - a software construction tool

Welcome to the SCons development tree.  The real purpose of this tree is
to package SCons for production distribution in a variety of formats,
not just to hack SCons code.

To that extent, the normal development cycle (enforced by Aegis) is not
to test the code directly, but to package SCons, unpack the package,
"install" SCons in a test subdirectory, and then to run the tests
against the unpacked and installed software.  This helps eliminate
problems caused by, for example, failure to update the list of files to
be packaged.

Note that if all you want to do is install and run SCons, it
will probably be easier for you to download and install the
scons-{version}.tar.gz or scons-{version}.zip package rather than to
work with the packaging logic in this tree.


LATEST VERSION
==============

Before going further, you can check that this package you have is the
latest version at the SCons download page:

        http://www.scons.org/download.html


EXECUTION REQUIREMENTS
======================

Running SCons requires Python version 1.5.2 or later.  There should be
no other dependencies or requirements to run SCons.

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 'g77' (such
as found in the GNU C compiler suite) on any other type of system.
You may, of course, override these default values by appropriate
configuration of Environment construction variables.


INSTALLATION REQUIREMENTS
=========================

Building and installing SCons from this package requires the Python
distutils package.  The distutils package was not shipped as a standard
part of Python until Python version 1.6, so if your system is running
Python 1.5.2, you may not have distutils installed.  If you are running
Python version 1.6 or later, you should be fine.

NOTE TO RED HAT USERS:  All Red Hat Linux versions as late as 7.3 (at
least) still ship Python 1.5.2 as the default, so you probably do *not*
have distutils installed, unless you have already done so manually.

In this case, your options are:

    --  (Optional.)  Install from a pre-packaged SCons package that
        does not require distutils:

            Red Hat Linux       scons-0.11-1.noarch.rpm

            Debian GNU/Linux    scons_0.11-1_all.deb
                                (or use apt-get)

            Windows             scons-0.11.win32.exe

    --  (Recommended.)  Download the latest distutils package from the
        following URL:

            http://www.python.org/sigs/distutils-sig/download.html

        Install the distutils according to the instructions on the page.
        You can then proceed to the next section to install SCons from
        this package.


INSTALLATION
============

Assuming your system satisfies the installation requirements in
the previous section, install SCons from this package by first
populating the build/scons/ directory.  (For an easier way to
install SCons, without having to populate this directory, use the
scons-{version}.tar.gz or scons-{version}.zip package.)

If you already have an appropriate version of SCons installed on your
system, populate the build/scons/ directory by running:

        $ scons build/scons

If you don't have SCons version 0.08 or later already installed on your
system, you can use SCons itself to populate the build/scons/ directory
with a little more typing:

        $ SCONS_LIB_DIR=`pwd`/src/engine python src/script/scons.py build/scons

Either command will populate the build/scons/ directory with the
necessary files and directory structure to use the Python-standard setup
script as follows:

        # cd build/scons
        # python setup.py install

This will install the scons script in the default system script
directory (/usr/bin or C:\Python*\Scripts, for example) and the build
engine in an appropriate SCons library directory (/usr/lib/scons or
C:\Python*\SCons, for example).

You should have system installation privileges (that is, "root" on POSIX
or "Administrator" on Windows) when running the setup.py script to
install SCons in the default system directories.

If you don't have system installation privileges, you can use the
--prefix option to specify an alternate installation location, such as
your home directory:

        $ cd build/scons
        $ python setup.py install --prefix=$HOME

This will install the scons script itself in $HOME/bin and the
associated library in $HOME/lib/scons


TESTING
=======

Tests are run by the runtest.py script in this directory.

There are two types of tests in this package:

    Unit tests for individual SCons modules live underneath the
    src/engine/ subdirectory and are the same base name as the module
    with "Tests.py" appended--for example, the unit test for the
    Builder.py module is the BuilderTests.py script.

    End-to-end tests of SCons live in the test/ subdirectory.

You may specifically list one or more tests to be run:

        $ python runtest.py src/engine/SCons/BuilderTests.py

        $ python runtest.py test/option-j.py test/Program.py

Alternatively, the runtest.py script takes a -a option that searches
the tree for all of the tests and runs them:

        $ python runtest.py -a

If more than one test is run, the runtest.py script prints a summary
of how many tests passed, failed, or yielded no result, and lists any
unsuccessful tests.

The above invocations all test directly the files underneath the src/
subdirectory, and do not require that a build be performed first.  The
runtest.py script supports additional options to run tests against
unpacked packages in the build/test-*/ subdirectories.  See the "TESTING
PACKAGES" section below.


BUILDING PACKAGES
=================

We now use SCons (version 0.08 or later) to build its own packages.
If you already have an appropriate version of SCons installed on your
system, you can build everything by simply running it:

        $ scons

If you don't have SCons version 0.08 or later already installed on your
system, you can build this version of SCons with itself with a little
more typing:

        $ SCONS_LIB_DIR=`pwd`/src/engine python src/script/scons.py

Depending on the utilities installed on your system, any or all of the
following packages will be built:

        build/dist/scons-0.11-1.noarch.rpm
        build/dist/scons-0.11-1.src.rpm
        build/dist/scons-0.11.linux-i686.tar.gz
        build/dist/scons-0.11.tar.gz
        build/dist/scons-0.11.win32.exe
        build/dist/scons-0.11.zip
        build/dist/scons-doc-0.11.tar.gz
        build/dist/scons-local-0.11.tar.gz
        build/dist/scons-local-0.11.zip
        build/dist/scons-src-0.11.tar.gz
        build/dist/scons-src-0.11.zip
        build/dist/scons_0.11-1_all.deb

The SConstruct file is supposed to be smart enough to avoid trying to
build packages for which you don't have the proper utilities installed.
For example, if you don't have Debian packaging tools installed, it
should just not build the .deb package, not fail the build.

If you receive a build error, please report it to the scons-devel
mailing list and open a bug report on the SCons bug tracker.

Note that in addition to creating the above packages, the default build
will also unpack one or more of the packages for testing.


TESTING PACKAGES
================

A full build will unpack and/or install any .deb, .rpm., .local.tar.gz,
.local.zip, .src.tar.gz, .src.zip, .tar.gz, and .zip packages into
separate build/test-*/ subdirectories.  (Of course, if a package was
not built on your system, it should not try to install it.)  The
runtest.py script supports a -p option that will run the specified tests
(individually or collectively via the -a option) against the unpacked
build/test-/* subdirectory:

        $ python runtest.py -p deb

        $ python runtest.py -p rpm

        $ python runtest.py -p local-tar-gz

        $ python runtest.py -p local-zip

        $ python runtest.py -p src-tar-gz

        $ python runtest.py -p src-zip

        $ python runtest.py -p tar-gz

        $ python runtest.py -p zip

(The canonical invocation is to also use the runtest.py -a option so
that all tests are run against the specified package.)


CONTENTS OF THIS PACKAGE
========================

Not guaranteed to be up-to-date (but better than nothing):

bin/
        Miscellaneous utilities used in SCons development.  Right now,
        there's a copy of the script we use to translate an Aegis change
        into a CVS checkin.

bootstrap.py
        A build script for use with Aegis.  This collects a current copy
        of SCons from the Aegis baseline directories in a bootstrap/
        subdirectory, and then executes SCons with the supplied
        command-line arguments.

build/
        This doesn't exist yet if you're looking at a vanilla source
        tree.  This is generated as part of our build process, and it's
        where, believe it or not, we *build* everything.

config
        The Aegis configuration, governing much of how we use Aegis to
        build, test, control source, etc.

debian/
        Files needed to construct a Debian package. The contents of this
        directory are dictated by the Debian Policy Manual
        (http://www.debian.org/doc/debian-policy). The package will not be
        accepted into the Debian distribution unless the contents of this
        directory satisfy the relevant Debian policies.

doc/
        SCons documentation.  A variety of things here, in various
        stages of (in)completeness.

etc/
        A subdirectory for miscellaneous things that we need.  Right
        now, it has copies of Python modules that we use for testing,
        and which we don't want to force people to have to install on
        their own just to help out with SCons development.

HOWTO/
        Documentation of SCons administrative procedures (making a
        change, releasing a new version).  Maybe other administrative
        stuff in the future.

LICENSE
        A copy of the copyright and terms under which SCons is
        distributed (the Open Source Initiative-approved MIT license).

LICENSE-local
        A copy of the copyright and terms under which SCons is
        distributed for inclusion in the scons-local-{version} packages.
        This is the same as LICENSE with a preamble that specifies
        the licensing terms are for SCons itself, not any other
        package that includes SCons.

README
        What you're looking at right now.

README-local
        A README file for inclusion in the scons-local-{version}
        packages.  Similar to this file, but stripped down and modified
        for people looking at including SCons in their shipped software.

rpm/
        The .spec file for building our RPM packages.

runtest.py
        Script for running SCons tests.  By default, this will run a
        test against the code in the local src/ tree, so you don't
        have to do a build before testing your changes.  Aegis uses
        it with an option that requires that you've done a build
        (aeb) before running tests.

SConstruct
        The "Makefile" for the SCons distribution.

        (It has been pointed out that it's hard to find the SCons API
        in this SConstruct file, and that it looks a lot more like a
        pure Python script than a build configuration file.  That's
        mainly because all of the magick we have to perform to deal with
        all of the different packaging formats requires a lot of pure
        Python manipulation.  In other words, don't look at this file
        for an example of how easy it is to use SCons to build "normal"
        software.)

src/
        Where the actual source code is kept, of course.

template/
        Template files, used by Aegis to give you a head start when you
        aenf or aent a new file.

test/
        End-to-end tests of the SCons utility itself.  These are
        separate from the individual module unit tests, which live
        side-by-side with the modules under src/.


DOCUMENTATION
=============

See the src/RELEASE.txt file for notes about this specific release,
including known problems.  See the src/CHANGES.txt file for a list of
changes since the previous release.

The doc/man/scons.1 man page is included in this package, and contains a
section of small examples for getting started using SCons.

Additional documentation for SCons is available at:

        http://www.scons.org/doc.html


LICENSING
=========

SCons is distributed under the MIT license, a full copy of which is
available in the LICENSE file. The MIT license is an approved Open
Source license, which means:

        This software is OSI Certified Open Source Software.  OSI
        Certified is a certification mark of the Open Source Initiative.

More information about OSI certifications and Open Source software is
available at:

        http://www.opensource.org/


REPORTING BUGS
==============

You can report bugs either by following the "Tracker - Bugs" link
on the SCons project page:

        http://sourceforge.net/projects/scons/

or by sending mail to the SCons developers mailing list:

        scons-devel@lists.sourceforge.net


MAILING LISTS
=============

A mailing list for developers of SCons is available.  You may send
questions or comments to the list at:

        scons-devel@lists.sourceforge.net

You may request a subscription to the scons-devel mailing list at:

        http://lists.sourceforge.net/lists/listinfo/scons-devel

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


FOR MORE INFORMATION
====================

Check the SCons web site at:

        http://www.scons.org/


AUTHOR INFO
===========

Steven Knight
knight at baldmt dot com
http://www.baldmt.com/~knight/

With plenty of help from the SCons Development team:
        Chad Austin
        Charles Crain
        Steve Leblanc
        Anthony Roach
        Terrel Shumway