[Tutor] Can you make a build in one step

Abel Daniel abli@freemail.hu
Tue Apr 8 11:30:02 2003


Jaco.Smuts wrote:
> Hi there
> 
> summary:
> I would like to run a build in one go for my new project. 
> Python does not make/compile/build as C for instance, but what I want to be
> able to do (in one go) is:
> - running various unit tests 
> - syntax checking 
You mean running pychecker, right? if the unit tests pass, the syntax
must be correct, and if the unit test don't catch a possible syntax
problem (ie. a part of the code isn't tested) then you should fix (i.e.
write more) unit tests. (At least that's what i gather from reading a
bit about XP, never done that myself.)
> - building distributions (http://www.python.org/doc/1.6/dist/dist.html)

Build systems for C and other compiled languages are important because
building a big program usually takes a lot of time. Build systems speed
this up by only rebuilding the parts which must be rebuilt (that part of the
source-code, or a part it depended on changed). So systems like 'make'
are a must for bigger projects.
Python, however, has this basically built in (thats what the .pyc files
are for).

If your project isn't too big, then a simple script could do it. Or you
could try a more 'advanced' framework, like Scons (http://www.scons.org/).
(I didn't try it). Its written in python and it's cross-platform (runs
on windows NT). However, be avare that using a big framework means that
you have to get comfortable with yet another software, which always
takes time.

Folks at comp.lang.python might give you more first-hand experience.

Abel Daniel