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.

This commit is contained in:
rnc 2013-05-22 13:10:29 +00:00
parent 296019e20f
commit 13be052751
2 changed files with 4 additions and 9 deletions

View File

@ -22,7 +22,6 @@
This module provides tools to facilitate the use of geom engine and geom This module provides tools to facilitate the use of geom engine and geom
objects in Salome. objects in Salome.
""" """
import salome import salome
GEOM = None # GEOM module is loaded only when needed 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.studyedit import getActiveStudyId, getStudyEditor
from salome.kernel.services import IDToObject, IDToSObject 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 from salome.gui import helper as guihelper
except:
pass
_geompys = {} _geompys = {}

View File

@ -44,17 +44,14 @@ Example::
Additionnal examples can be found as unit tests in the source code. Additionnal examples can be found as unit tests in the source code.
""" """
from salome.kernel.deprecation import is_called_by_sphinx
geompyEnable = True geompyEnable = True
try: if not is_called_by_sphinx():
import salome import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New(salome.myStudy)
except:
geompyEnable = False
class Sketcher: class Sketcher: