From: rnc Date: Wed, 22 May 2013 13:10:29 +0000 (+0000) Subject: Integration of a patch from Renaud Barate which fixes some issues at install step... X-Git-Tag: V7_2_0_WIN X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13be0527517184f1452d7a902dda0afc463a1eba;p=modules%2Fgeom.git Integration of a patch from Renaud Barate which fixes some issues at install step due to sphinx importing some python packages when building th documentation. --- diff --git a/src/GEOM_PY/geomtools.py b/src/GEOM_PY/geomtools.py index 4f9a01044..0f04c80f1 100644 --- a/src/GEOM_PY/geomtools.py +++ b/src/GEOM_PY/geomtools.py @@ -22,7 +22,6 @@ This module provides tools to facilitate the use of geom engine and geom objects in Salome. """ - import salome GEOM = None # GEOM module is loaded only when needed @@ -32,10 +31,9 @@ logger = Logger("salome.geom.geomtools", color = termcolor.RED) from salome.kernel.studyedit import getActiveStudyId, getStudyEditor from salome.kernel.services import IDToObject, IDToSObject -try: +from salome.kernel.deprecation import is_called_by_sphinx +if not is_called_by_sphinx(): from salome.gui import helper as guihelper -except: - pass _geompys = {} diff --git a/src/GEOM_PY/sketcher.py b/src/GEOM_PY/sketcher.py index 7a20387ec..c85c4ea09 100644 --- a/src/GEOM_PY/sketcher.py +++ b/src/GEOM_PY/sketcher.py @@ -44,17 +44,14 @@ Example:: Additionnal examples can be found as unit tests in the source code. """ - +from salome.kernel.deprecation import is_called_by_sphinx geompyEnable = True -try: +if not is_called_by_sphinx(): import salome salome.salome_init() import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) -except: - geompyEnable = False - class Sketcher: