From c562120a93d403015a122ef61af673d94b4bf482 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 2 Nov 2011 12:49:41 +0000 Subject: [PATCH] Fix make distcheck error (merge from V6_4_BR) --- doc/Makefile.am | 4 ++-- doc/docutils/Makefile.am | 8 ++++++++ src/GEOM_PY/geomtools.py | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index f48046a3c..f6dc56cf4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -22,8 +22,8 @@ # Date : 30/11/2001 # Modified by : Alexander BORODIN (OCN) - autotools usage # -#SUBDIRS = salome docutils -SUBDIRS = salome +SUBDIRS = salome docutils +#SUBDIRS = salome usr_docs: (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) diff --git a/doc/docutils/Makefile.am b/doc/docutils/Makefile.am index 7e0f8bfc8..a4b8c3368 100644 --- a/doc/docutils/Makefile.am +++ b/doc/docutils/Makefile.am @@ -38,9 +38,17 @@ SPHINXBUILD = sphinx-build PAPEROPT_a4 = -D latex_paper_size=a4 ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR) +if GEOM_ENABLE_GUI +SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(GUI_ROOT_DIR)/lib/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages +else !GEOM_ENABLE_GUI SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages +endif +if GEOM_ENABLE_GUI +SPHINX_LD_LIBRARY_PATH = $(GUI_ROOT_DIR)/lib/salome:$(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib +else !GEOM_ENABLE_GUI SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib +endif .PHONY: latex diff --git a/src/GEOM_PY/geomtools.py b/src/GEOM_PY/geomtools.py index 8b243a9b6..27fc960e5 100644 --- a/src/GEOM_PY/geomtools.py +++ b/src/GEOM_PY/geomtools.py @@ -31,8 +31,11 @@ from salome.kernel import termcolor logger = Logger("salome.geom.geomtools", color = termcolor.RED) from salome.kernel.studyedit import getActiveStudyId, getStudyEditor -from salome.gui import helper from salome.kernel.services import IDToObject +try: + from salome.gui import helper +except ImportError: + pass _geompys = {} -- 2.39.2