M. Nawijn a écrit :
> Hi all,
>   
Hi Marco,

> I also have been messing around with the SCons build script a little.
> It is indeed a little alpha-ish, but please be a little patient. SCons
> is a fantastic build system (in my slightly biased opinion). I used in
> a combination with different compilers in a multi-platform environment
> and it works like a charm!
>
> OCC and PythonOCC are I guess daunting for every build system, so we
> just have to work on it a little. I will pitch in as much as possible.
>
> Today I focused on the Linux part of the  SCons file. Some suggestions:
>
> 1. Replace sys.platform by platform,platform(),
> platform.architecture() and platform.system() calls. This allows us to
> remove the system call to "apt", which is debian/ubuntu specific (I
> use fedora ;).
>   
Thanks for the hint, I never used the 'platform' module before. The 
'architecture' variable is planned to be passed to the g++ 'march' flag. 
I then need a function that returns either 'i386', 'i686', etc.

Then, according to the architecture, we might have something like:
g++ -o ... -march=i386
or
g++ -o ... -march=i686.

This would allow to have an optimized pythonOCC depending on the 
platform on which it is build. However, the platform.architecture() 
function "Returns a tuple (bits, linkage) which contain information 
about the bit architecture and the linkage format used for the 
executable. Both values are returned as strings." (extracted from Python 
documentation), and cannot be used as I wish. That's why I use a call to 
a  system command ('apt-cache' for instance) that gives me the expected 
string ('i386', 'i686' ...). You're absolutely right: this is not 
platform independant ('apt-cache' is only available for Debian based 
Linux systems). Do you know any platform independant Python code that 
could give me the result?
> 2. We also somehow need to re-factor the code a bit because all paths
> are specified both in the SConstruct file and the environment.py file.
> During SWIG generation, both settings are used, so if you do not
> specify proper OCC_INC paths in both files, the generation of SWIG
> files will fail.
>   
Completely true. I first try to make something that works, and, when 
it's done, it will be time to make this more coherent.
> I will look further into SCons to speed up the build.
>   
I currently face an issue with SWIG/SCons: each time the SConscruct 
script is executed, all the .i file are swigged. I there any way to 
cache this with scons (and only re-swig the .i file when he is modified)?

> Ciao,
>   
Many thanks for your precious advices,

Cheers,
> Marco
>   
Thomas
>
>
> On Wed, Mar 11, 2009 at 6:40 PM, Jelle Feringa <jelleferi...@gmail.com> wrote:
>   
>>>> 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
>>
>> _______________________________________________
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>>
>>     
>
>   

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to