Hi Thomas,

> To be as portable as possible, it's better to use the os.path.join method:
> OCC_INC = os.path.join(OCC_ROOT,'inc')
> OCC_LIB = os.path.join(OCC_ROOT,'lib')

Yep, that's certainly better.

> 
>> in environment.py? I think that should work on all Linux installations.
> 
> As far as I know, according to the OpenCascade package you choose to 
> install (whether it is under Ubuntu or OpenSuse), /inc and /lib 
> directories are not always located in the same folder.
> 

Yes, re-reading my own suggestion, you're right. Taking VTK as an example, I 
have here

/usr/include/vtk
/usr/lib/vtk-5.0

so yes, it is a bit more complicated. I'll try and think of another solution.

> Here is the answer: SWIG_generator.py uses GCCXML to parse OpenCascade 
> headers and check all classes/methods to wrap. GCCXML performs a 
> *recursive* parse of all headers. When processing the TopOpeBRep_* 
> headers, I noticed that GCCXML didn't find the file 
> TopOpeBRepDS_tools.hxx and the process fails. The 
> 'TopOpeBRepDS_tools.hxx' is simply missing from the /inc OCC directory. 
> I think it's a bug of OpenCascade but I didn't send any feedback to the 
> Opencascade team. I just 'added' an empty TopOpeBRepDS_tools.hxx to the 
> /inc directory so that GCCXML parsing is ok (note that SWIG does not 
> need this file).

Thanks for the explanation - I'm still trying to learn exactly how you've 
managed to generate these wrappers ;-)

> The problem is that it requires, on Linux, root privileges since it 
> modifies a directory that may have read only access for common user. 
> It's a thing I didn't think about when hacking on Windows. Another 
> soultion (Linux compliant) would be to:
> - create the missing header TopOpeBRepDS_tools.hxx in the 
> SWIG_modular_linux_darwin directory
> - add this directory to the list of include paths so that g++ find the 
> header.
> We could then remove all that weird lines from setup.py

I like that solution, let's do that.

        Arthur

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

Reply via email to