From 8c966f9eb1b6920e175dd121c2affcf3d71fa862 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 14 Oct 2010 10:38:27 +0000 Subject: [PATCH] Fix some tiny bug with 64 bits and : python 2.6 native products --- bin/setenv.py | 7 +++++++ doc/docutils/Makefile.am | 2 +- salome_adm/unix/config_files/python.m4 | 12 ++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bin/setenv.py b/bin/setenv.py index 493bd0b4f..59fa58528 100755 --- a/bin/setenv.py +++ b/bin/setenv.py @@ -194,6 +194,13 @@ def set_env(args, modules_list, modules_root_dir, silent=False): python_version,"site-packages", salome_subdir), "PYTHONPATH") + import platform + if platform.machine() == "x86_64": + add_path(os.path.join(module_root_dir,"lib64", + python_version,"site-packages", + salome_subdir), + "PYTHONPATH") + pass add_path(os.path.join(module_root_dir,get_lib_dir(), python_version,"site-packages", salome_subdir, diff --git a/doc/docutils/Makefile.am b/doc/docutils/Makefile.am index 84bfcf104..5db2edb5a 100644 --- a/doc/docutils/Makefile.am +++ b/doc/docutils/Makefile.am @@ -41,7 +41,7 @@ SPHINXBUILD = sphinx-build PAPEROPT_a4 = -D latex_paper_size=a4 ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR) -SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages +SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib diff --git a/salome_adm/unix/config_files/python.m4 b/salome_adm/unix/config_files/python.m4 index 5260f7eb3..e842a2798 100644 --- a/salome_adm/unix/config_files/python.m4 +++ b/salome_adm/unix/config_files/python.m4 @@ -64,6 +64,11 @@ AC_DEFUN([CHECK_PYTHON], AC_SUBST(PYTHON_VERSION) PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile + if test ! -f "$PY_MAKEFILE"; then + if test "${build_cpu::6}" = "x86_64" ; then + PY_MAKEFILE=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile + fi + fi if test ! -f "$PY_MAKEFILE"; then AC_MSG_WARN([*** Couldn't find ${PY_MAKEFILE}. Maybe you are *** missing the development portion of the python installation]) @@ -77,6 +82,13 @@ AC_DEFUN([CHECK_PYTHON], PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" PYTHON_LIB=$PYTHON_LIBS PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a + if test "${build_cpu::6}" = "x86_64" ; then + if test "$PY_MAKEFILE" = "${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile" ; then + PYTHON_LIBS="-L${PYTHON_PREFIX}/lib64/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" + PYTHON_LIB=$PYTHON_LIBS + PYTHON_LIBA=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a + fi + fi dnl At times (like when building shared libraries) you may want dnl to know which OS Python thinks this is. -- 2.39.2