Commit adbd6a91 authored by Berk Geveci's avatar Berk Geveci
Browse files

BUG: Moved the paraview module in Resources. Otherwise, it conflicts with the paraview binary

parent 8ba39ec8
......@@ -9,6 +9,7 @@ fi
mkdir -p "@ParaView_BINARY_DIR@/paraview_bundle/paraview.app/Contents/Frameworks"
mkdir -p "@ParaView_BINARY_DIR@/paraview_bundle/paraview.app/Contents/MacOS"
mkdir -p "@ParaView_BINARY_DIR@/paraview_bundle/paraview.app/Contents/Resources"
cd "@ParaView_BINARY_DIR@/paraview_bundle"
echo "Copy ParaView bundle"
......@@ -22,7 +23,7 @@ echo "Copy ParaView libraries"
(cd "@ParaView_BINARY_DIR@/bin" && tar c${TAR_FLAG}f - *.dylib *.so) | (cd paraview.app/Contents/MacOS && tar xf - )
echo "Copy ParaView Python scripts"
(cd "@ParaView_BINARY_DIR@/Utilities/VTKPythonWrapping" && tar c${TAR_FLAG}f - paraview) | (cd paraview.app/Contents/MacOS && tar xf - )
(cd "@ParaView_BINARY_DIR@/Utilities/VTKPythonWrapping" && tar c${TAR_FLAG}f - paraview) | (cd paraview.app/Contents/Resources && tar xf - )
#exit
......
......@@ -88,7 +88,7 @@ static void vtkPythonAppInitPrependPath(const char* self_dir)
package_dir = pkg_prefix + "/../../../../Utilities/VTKPythonWrapping";
package_dir = vtksys::SystemTools::CollapseFullPath(package_dir.c_str());
}
if(vtksys::SystemTools::FileIsDirectory(package_dir.c_str()))
if(0 && vtksys::SystemTools::FileIsDirectory(package_dir.c_str()))
{
// This executable is running from the build tree. Prepend the
// library directory and package directory to the search path.
......@@ -106,6 +106,7 @@ static void vtkPythonAppInitPrependPath(const char* self_dir)
// packages in sys.path himself/herself.
const char* inst_dirs[] = {
"/paraview",
"/../Resources/paraview", // MacOS
"/../lib/paraview-" PARAVIEW_VERSION "/paraview",
"/../../lib/paraview-" PARAVIEW_VERSION "/paraview",
"/lib/python" VTK_PYTHON_VERSION "/site-packages/paraview", // UNIX --prefix
......@@ -115,6 +116,11 @@ static void vtkPythonAppInitPrependPath(const char* self_dir)
0
};
vtkstd::string prefix = self_dir;
// On OS X distributions, the libraries are in a different directory
// than the module. They are in the same place as the executable.
#if defined(__APPLE__)
vtkPythonAppInitPrependPythonPath(self_dir);
#endif
for(const char** dir = inst_dirs; *dir; ++dir)
{
package_dir = prefix;
......@@ -187,7 +193,7 @@ public:
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVPythonInterpretor);
vtkCxxRevisionMacro(vtkPVPythonInterpretor, "1.11");
vtkCxxRevisionMacro(vtkPVPythonInterpretor, "1.11.4.1");
//-----------------------------------------------------------------------------
vtkPVPythonInterpretor::vtkPVPythonInterpretor()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment