Jelle Feringa a écrit : >>> Been messing with it all day, so probably not a complete list. How do >>> I make swig cache whatever it's doing? 15 minute compile times between >>> commenting out another module makes for slow progress. >> I don't know! I discovered SCons one week ago, so any advice is welcome. > > Thomas, > > Perhaps its good if you give us some advice on using either scons or > the `python setup.py build` cmd line. > The latter is working well for me. When a module fails to compile is > comment it out ( Modules.py ) and re-run, it start from where it left > off, so that's cool! > > the Scons script sure is a great idea, but very alpha-ish for the > moment, right? > > -jelle There are currently two ways to build python OCC: (1) a distutils based 'setup.py' script: cd pythonocc/cd src/python setup.py build (2) a scons (1.2) based build system: cd pythonocc/cd src/scons. The latest version of scons is automatically downloaded if your installed version is older than 1.2
The way they work is very similar: it's a loop over the list of modules. If the compilation of a module fails, you then just have to comment out the related line in the Modules.py script and re-run (1) or (2). My goal is to definitely move from (1) to (2) in a short term. python distutil is a bit tricky and not really platform independant (ie flags passed to the compiler/linker depend on the platform). scons is really powerfull, and in a sense can be seen as a higher-level built upon distutils that adds dependencies check and a set of many useful and platform independant tools. Another advantage: .so pythonOCC libraries generated with scons are almost twice smaller than the one produced by distutils! (2) is still in an experimental stage. However, it runs on my Ubuntu 8.04 virtual box image. The feature currently missing (compared to distutils) is an 'install' procedure, that copy all pythonOCC files to a /site-packages/OCC folder. It sould not be very difficult to implement. The md0.1 python release was basically a set of 4 files: - environment.py: contains information about platform specific settings, - setup.py: distutils based build process, - Modules.py: a list of all modules to build, - SWIG_generator.py: the script that produces SWIG files. The upcoming 0.2 release will only be a '3 files' release: - SConsctruct (scons based compilation process, embeds environment.py), - Modules.py - SWIG_generator.py At the moment (svn rev. 131), I would suggest: - Windows users to use (1), - posix users (Linux/MacOSX) to use (2) (and report bugs!) Cheers, Thomas _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users