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
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 = {}

View File

@ -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: