2010/9/24 Gero Putzar <gput...@beckarndt.com.au> > Hi, >
Hi Gero, I guess you ran your tests from the latest rev. of the svn trunk (r1105), right? > > apparently (wrapper_features_unittest.py works) I just managed to install > the recent svn snapshot on Debian stable. Here are some notes about what I > had to do and modify based on the instructions on > http://code.google.com/p/pythonocc/wiki/InstallationLinux > > I rebuilt the SWIG files first as described at the end of the instructions. > > I'm using the opencascade package provided by the distribution. > > * I don't have python 2.6 installed. I think installer software should be > as > little demanding as possible, therefore I suggest to change the code in the > repository: > in wrapper_features_unittest.py replace "self.assertEqual(format(..." by > "self.assertEqual(str(..." (twice) > self.assertEqual(str(pnt.Coord()),'(40.0, 0.0, 0.0)') > # self.assertEqual(format(pnt.Coord()),'(40.0, 0.0, 0.0)') > You're right. Fix committed here : http://code.google.com/p/pythonocc/source/detail?r=1106 > > * add /usr/local/lib to your library search path: export > LD_LIBRARY_PATH="/usr/local/lib" > > * "python setup.py -generate-swig-files" does not work > -generate-swig-files is not a valid option for the installer script. Rather use python generate_swig_files.py > > * python generate_swig_files.py > - needs also the module/package pyplusplus additionally to gccxml and > pygccxml mentioned in the wiki. (No Debian package for them) > The generate_swig_files.py script parses OpenCascade headers to build the *.i SWIG files. It requires indeed pyplusplus, pygccxml and gccxml. However, each time I modify this script, I take care that the folders named /wrapper/SWIG/win32 and /wrapper/SWIG/linux_darwin are sync with these modification. > - does not work properly when those modules are not installed. It checks > whether the required moules are there but then ignores the result. > > * ...src/unittest$ python wrapper_features_unittest.py > yields the following error: > ImportError: /usr/local/lib/libSMESH.so: undefined symbol: > _gfortran_transfer_character > > Workaround: in setup.py approximately line number 100 append > libgfortran.so to the required libraries like so: > # > # SMESH libraries > # ] > SMESH_LIBS = ['SMESH'] > environment.ELA = environment.ELA + ['-lgfortran'] > Does it work with this fix? In my opinion, the linker should rather link libgfortran to libSMESH. I thought the CMake script automatically links libSMESH to the right gfortran library according to the fortran compiler you use. Which version of CMake did you install on your machine? > > > For an earlier attempt with an early version of pythonocc I took the > following notes, I don't know which of those are still necessary but those > changes are still in effect on my computer. Just in case you run out of > ideas: > > * install package swig > REQUIRED. > * install package libboost-dev > NOT REQUIRED. The boost headers are included in the pythonocc trunk, in the /src/contrib/boost directory. > * as root: > # ln -s /usr/lib/libTKCDLFront-6.3.0.so /usr/lib/libTKCDLFront.so > # ln -s /usr/lib/libTKCPPClient-6.3.0.so /usr/lib/libTKCPPClient.so > # ln -s /usr/lib/libTKCPPExt-6.3.0.so /usr/lib/libTKCPPExt.so > # ln -s /usr/lib/libTKCPPIntExt-6.3.0.so /usr/lib/libTKCPPIntExt.so > # ln -s /usr/lib/libTKCPPJini-6.3.0.so /usr/lib/libTKCPPJini.so > # ln -s /usr/lib/libTKCSFDBSchema-6.3.0.so /usr/lib/libTKCSFDBSchema.so > # ln -s /usr/lib/libTKIDLFront-6.3.0.so /usr/lib/libTKIDLFront.so > # ln -s /usr/lib/libTKTCPPExt-6.3.0.so /usr/lib/libTKTCPPExt.so > # ln -s /usr/lib/libTKWOK-6.3.0.so /usr/lib/libTKWOK.so > # ln -s /usr/lib/libTKWOKTcl-6.3.0.so /usr/lib/libTKWOKTcl.so > Those libraries are not required anymore. The WOK and Draw packages, as well as Java wrappers, are not wrapped by pythonOCC. > > I hope this helps somebody. Thanks for providing this software. > Thank you for your feedback. A few other unittests were recently added. You can run all the tests with the test_all.py script (64 tests are available). What is the output on your Debian install ? > > Kind regards, > Gero. > All the best, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users