On 2010/5/21 Thomas Paviot wrote: [...] > I had a discussion a couple of days weeks ago with Olider Borm, who > contributed the debian binary package for pythonOCC-0.4. It seems not > possible to set the CS_GraphicShr variable from the debian packaging tool. > So here is his suggestion: > """ > If there is an automatic way to determine the location of the > libTKOpenGl*.so library if this variable does not exist I would prefer > such a solution. Maybe something like: > > ldd /usr/lib64/python2.6/site-packages/OCC/_Geom2dToIGES.so | grep -i > libTKOpenGl > """ > I think it could be a good solution to avoid this annoying step.
No, environment variables do not need to be set in Debian because one knows exactly where files are located at, because pythonocc would depend on libopencascade-foundation-dev and this package ships /usr/lib/libTKOpenGl.so. That is why CASROOT does not need to be set when using the Debian package, all components are put at a known place and source files have been modified to look for files there. This location can still be overridden by using environment variables. Have a look at src/addons/Display/wxDisplay.py for instance: def InitDriver(self): try: os.environ["CSF_GraphicShr"] except KeyError: raise "Please set the CSF_GraphicShr environment variable." self._display = OCCViewer.NISViewer3d(self.GetHandle()) self._display.Create() self._inited = True print "Inited!!" Everything would work just fine on Debian, except that this check about CSF_GraphicShr makes program abort. This check should be removed, or at least performed only when self._display.Create() fails. Denis _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users