[PyKDE] [PATCH] new build.py options for lib64 and cat split
Hi Phil, next attempt for $subject. They're all separate lowercase options now. Let me know, if this is acceptable for you. I've thought some time on how to make the path handling simpler without loosing flexibility nor functionality, but don't wanted to risk breaking stuff in obscure environments, which I cannot test here. I think, that stability has higher priority by now shortly before the 3.6 release. This approach has the advantange to be easily adopted by current build systems, too. One possible alternative would be changing -d to specify a relative dir, e.g. site-packages, and let the new -t option specify the python base, but this leads to the afore mentioned disadvantage. The lib64 stuff is logically chacked against 64 bit package listings from SuSE. Here is something (hopefully) suitable for your ChangeLog: Added -r flag to the build system to specify the Qt library directory. This is useful for 64 bit systems, where the libs are placed in a lib64 directory. Same goes for the new -t flag, which specify the python lib directory. Both options defaults to lib in order to keep the current behaviour, and should be specified as lib64 on such systems. Added -j # flag to the build system for splitting huge modules, consisting of more then 100 single c++ modules, into # of pieces, when concatenated (-c). This is useful in SMP environments, combined with make -j #, where # should correspond. It's also useful for troubling c++ compilers, which fail on such big sources otherwise. Pete--- build.py.orig 2003-03-24 02:51:15.0 +0100 +++ build.py 2003-03-26 12:50:18.0 +0100 @@ -21,16 +21,18 @@ # Define the globals. progName = None qtDir = None qtIncDir = None +qtLibDir = lib qtVersion = 0 qtLib = None platPyScriptDir = None platPyDLLDir = None platPySiteDir = None platPyIncDir = None +platPyLibDir = lib platPyLib = None sipModuleDir = None sipIncDir = None sipBin = None sipVersion = 3 @@ -57,38 +59,42 @@ debugMode = release catCppFiles = 0 qpeTag = None licType = None gccFlags = [] +catSplit = 0 def usage(rcode = 2): Display a usage message and exit. rcode is the return code passed back to the calling process. -global progName, platBinDir, platMake, modDir, platQTDIRName, sipIncDir +global progName, platBinDir, platMake, modDir, platQTDIRName, platPyLibDir, sipIncDir, qtLibDir print Usage: -print %s [-h] [-a version] [-b dir] [-c] [-d dir] [-e dir] [-f gccflag] [-g prog] [-i dir] [-l Qt-library] [-m prog] [-n dir] [-o dir] [-p dir] [-q dir] [-s dir] [-u] [-w] % (progName) +print %s [-h] [-a version] [-b dir] [-c] [-d dir] [-e dir] [-f gccflag] [-g prog] [-i dir] [-j #] [-l Qt-library] [-m prog] [-n dir] [-o dir] [-p dir] [-q dir] [-r dir] [-s dir] [-t dir] [-u] [-w] % (progName) print where: print -h display this help message print -a tag explicitly enable the qtpe module print -b dir where pyuic and pylupdate will be installed [default %s] % (platBinDir) print -c concatenate each module's C++ source files print -d dir where PyQt will be installed [default %s] % (modDir) print -e dir the directory containing the SIP header files [default %s] % (sipIncDir) print -f gccflag additional GCC flag, eg. -fno-exceptions print -g progthe name of the Makefile generator print -i dir the directory containing the Qt header files [default %s%sinclude] % (platQTDIRName,os.sep) +print -j # split huge concatenated modules in # pieces print -l Qt-library explicitly specify the type of Qt library, either qt, qt-mt or qte print -m progthe name of the Make program [default %s] % (platMake) print -n dir the directory containing the QScintilla header files [default %s%sinclude] % (platQTDIRName, os.sep) print -o dir the directory containing the QScintilla library [default %s%slib] % (platQTDIRName, os.sep) print -p dir the name of the SIP code generator [default sip] print -q dir the Qt base directory [default %s] % (platQTDIRName) +print -r dir the Qt lib directory [default %s] % (qtLibDir) print -s dir the directory containing the SIP module +print -t dir Python lib directory [default %s] % (platPyLibDir) print -u build with debugging symbols print -w enable the use of Python 1.5.x under Windows sys.exit(rcode) @@ -152,12 +158,12 @@ def initGlobals(): Sets the values of globals that need more than a simple assignment. global platMake, platCopy, platPyScriptDir, platPyDLLDir, platPySiteDir -global platPyIncDir, platPyLib, platQTDIRName, platBinDir, platMkdir -global platRmdir, modDir, pyFullVers, pyVersNr, sipIncDir +global
Re: [PyKDE] [PATCH] new build.py options for lib64 and cat split
On Wednesday 26 March 2003 14:59, Phil Thompson wrote: Sorry, I think you've misunderstood. The -r flag should define the full path of the Qt library directory - not just a component of it - like the -i flag for the header files. This is more flexible because it allows any arbitary directory to be specified. Same for -t - or does the -d flag already do it? Phil I understood your concerns, but hesitated to make such deep changes. Attached is what you asked for ;-) Hopefully all is well, especially the win32 changes, which I haven't tested. Here is something (hopefully) suitable for the ChangeLog: Added -r flag to the build system to explicitly specify the Qt library directory. This is useful for 64 bit systems, where the libs are placed in $QTDIR/lib64, unlike the default $QTDIR/lib. Same goes for the new -t flag, which specify the python base directory, which is /usr/lib64/python#.# on such systems. This option takes priority over -d. For concatenated builds (-c), a -j # flag was added to the build system for splitting huge modules, consisting of more then 100 single c++ modules, into # of pieces. This is useful in SMP environments, combined with make -j #, where # should correspond, to saturate the CPUs. It's also helpful for troubling c++ compilers and memory constraint systems, which may fail on such big sources otherwise. Pete--- build.py.orig 2003-03-24 02:51:15.0 +0100 +++ build.py 2003-03-26 16:34:09.0 +0100 @@ -21,12 +21,14 @@ # Define the globals. progName = None qtDir = None qtIncDir = None +qtLibDir = None qtVersion = 0 qtLib = None +platPyBaseDir = None platPyScriptDir = None platPyDLLDir = None platPySiteDir = None platPyIncDir = None platPyLib = None @@ -57,38 +59,42 @@ debugMode = release catCppFiles = 0 qpeTag = None licType = None gccFlags = [] +catSplit = 0 def usage(rcode = 2): Display a usage message and exit. rcode is the return code passed back to the calling process. -global progName, platBinDir, platMake, modDir, platQTDIRName, sipIncDir +global progName, platBinDir, platMake, modDir, platQTDIRName, platPyBaseDir, sipIncDir print Usage: -print %s [-h] [-a version] [-b dir] [-c] [-d dir] [-e dir] [-f gccflag] [-g prog] [-i dir] [-l Qt-library] [-m prog] [-n dir] [-o dir] [-p dir] [-q dir] [-s dir] [-u] [-w] % (progName) +print %s [-h] [-a version] [-b dir] [-c] [-d dir] [-e dir] [-f gccflag] [-g prog] [-i dir] [-j #] [-l Qt-library] [-m prog] [-n dir] [-o dir] [-p dir] [-q dir] [-r dir] [-s dir] [-t dir] [-u] [-w] % (progName) print where: print -h display this help message print -a tag explicitly enable the qtpe module print -b dir where pyuic and pylupdate will be installed [default %s] % (platBinDir) print -c concatenate each module's C++ source files print -d dir where PyQt will be installed [default %s] % (modDir) print -e dir the directory containing the SIP header files [default %s] % (sipIncDir) print -f gccflag additional GCC flag, eg. -fno-exceptions print -g progthe name of the Makefile generator print -i dir the directory containing the Qt header files [default %s%sinclude] % (platQTDIRName,os.sep) +print -j # split huge concatenated modules in # pieces print -l Qt-library explicitly specify the type of Qt library, either qt, qt-mt or qte print -m progthe name of the Make program [default %s] % (platMake) print -n dir the directory containing the QScintilla header files [default %s%sinclude] % (platQTDIRName, os.sep) print -o dir the directory containing the QScintilla library [default %s%slib] % (platQTDIRName, os.sep) print -p dir the name of the SIP code generator [default sip] print -q dir the Qt base directory [default %s] % (platQTDIRName) +print -r dir the Qt lib directory [default %s%slib] % (platQTDIRName, os.sep) print -s dir the directory containing the SIP module +print -t dir Python base directory [default %s] % (platPyBaseDir) print -u build with debugging symbols print -w enable the use of Python 1.5.x under Windows sys.exit(rcode) @@ -151,11 +157,11 @@ def initGlobals(): Sets the values of globals that need more than a simple assignment. -global platMake, platCopy, platPyScriptDir, platPyDLLDir, platPySiteDir +global platMake, platCopy, platPyBaseDir, platPyScriptDir, platPyDLLDir, platPySiteDir global platPyIncDir, platPyLib, platQTDIRName, platBinDir, platMkdir global platRmdir, modDir, pyFullVers, pyVersNr, sipIncDir pyFullVers = string.split(sys.version)[0] @@ -169,35 +175,39 @@ if sys.platform == win32: platMake = nmake