On 2011/9/1 Thomas Paviot <tpav...@gmail.com>:
[...]
> Hi Denis,
>
> Commit  191a184 is sync with OCE-0.6.0dev (in the OCE project, Issue #89 was
> related to a problem with building pythonocc).
>
> There is actually a CMakeLists.txt file, but it is quite old and I usually
> don't include it in the release package. It was a first attempt to make
> pythonocc use CMake but I didn't work onthis file for a while. Consider it
> as outdated. Rather use the python distutils module:
> $ cd src
> $ python setup.py build
> $ python setup.py install
>
> And everything should compile properly. Note that you have to
> download/compile the latest svn rev of salomegeometry (which is also
> available in the pythonocc /src/contrib/geom-5.1.5.9 folder). If you don't
> want to use the geom wrapper, use:
> $ python setup.py build --disable-GEOM install

Ok, thanks.
Here are two easy fixes:
  * in setup.py line 313 replace --disable-geom by --disable-GEOM in
helper message
  * in src/wrapper/Visualization/Visualization.i line 25, add quotes
around filename to avoid expansion of the SWIG macro (it is defined by
swig 2.0.4); this problem had been reported here.

But I do not want to install pythonocc into /usr/local, I want to
install it into my home directory.  The problem is that setup.py does
some processing before calling setup(), and thus "python setup.py
install --help" does not display the expected result.  Because of
that, I also have to pass --disable-* flags when installing, this is
inconvenient.
Anyway, running "python setup.py [option] install --user" worked.  But
  $ cd unittest
  $ python test_all.py
    File "/home/barbier/.local/lib/python2.6/site-packages/OCC/Standard.py",
line 26, in swig_import_helper
      _mod = imp.load_module('_Standard', fp, pathname, description)
  ImportError: libFWOSPlugin.so.1: cannot open shared object file: No
such file or directory

It does not find OCC libraries.  RPATH could be used when compiling to
let pythonocc automatically finds those libraries; OTOH I should
certainly set LD_LIBRARY_PATH when installing OCC libraries in my home
directory, so here we go:
  $ LD_LIBRARY_PATH=$HOME/oce-dev/lib python test_all.py
  Traceback (most recent call last):
    File "test_all.py", line 29, in <module>
      import topology_operations_unittest
    File 
"/home/barbier/Projects/pythonocc/src/unittest/topology_operations_unittest.py",
line 34, in <module>
      from OCC.Utils.Construct import *
    File 
"/home/barbier/.local/lib/python2.6/site-packages/OCC/Utils/Construct.py",
line 50, in <module>
      from OCC.GEOMAlgo import GEOMAlgo_Splitter
  ImportError: No module named GEOMAlgo

This one is more annoying, I would like to run unit tests even if I
disabled GEOM.

Denis

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

Reply via email to