[PyKDE] Python script dependancy

James Emerton ephelon at gmail.com
Mon Dec 5 19:17:15 GMT 2005

I'm using scons in a project with a rather intricate build process.  I
am trying to eliminate manual steps from the build process, and
integrate external sources directly into the build tree.  So far, this
has gone quite well.  The building of external dependancies is done
with several batch scripts.  (What a wimpy shell hath Windows!)

I also use BuildDir to separate different variants into their own
tree.  There is a Python interpreter and library installed in each
variant's build directory.  (SCons itself runs from a top-level
Python.)  I have done this because of all of the extension modules
that are built from my sources.  (I'm using SIP for this.)

I have a Python script (MakeRecord.py) for generating an ORM layer
that depends on one of the extension modules. (btrv.pyd)  I can't seem
to get SCons to act on a dependancy between the Python script and an
install target for the extension module.  I suspect this is because
there is no build action for a Python script.

I've tried using MakeRecord.py from the original
(scripts/MakeRecord.py) and from a build dir version.  I've also
marked MakeRecord.py as AlwaysBuild.  Each source for MakeRecord
(*.bpy) is explicitly made dependant on MakeRecord from inside the
emitter attached to the MakeRecord builder.

        | +-Build\debug-icl\sip\btrv\Makefile
        |   +-Build\debug-icl\sip\btrv\configure.py

Here is the output from -n --debug=tree for one attempt.  The
dependancy tree looks perfect, but if I try to build
APTransactionFile.cpp, the script cannot find the btrv module.  If I
build the btrv module explicitly, then APTransactionFile.cpp,
everything is fine.

I'm using scons 0.96.1 on WinXP SP2 with Python 2.4.2.  Any ideas
would be most appreciated at this point!


More information about the PyQt mailing list