瀏覽代碼

HPCC-24170 Embedded python not working in cloud installs

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 年之前
父節點
當前提交
1d85c8ceb5
共有 3 個文件被更改,包括 14 次插入1 次删除
  1. 1 1
      dockerfiles/platform-build/Dockerfile
  2. 6 0
      plugins/py3embed/CMakeLists.txt
  3. 7 0
      plugins/pyembed/CMakeLists.txt

+ 1 - 1
dockerfiles/platform-build/Dockerfile

@@ -48,7 +48,7 @@ RUN mkdir build
 WORKDIR /hpcc-dev/build
 
 ARG BUILD_TYPE=RelWithDebInfo
-RUN cmake /hpcc-dev/HPCC-Platform -Wno-dev -DCONTAINERIZED=1 -DINCLUDE_PLUGINS=1 -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
+RUN cmake /hpcc-dev/HPCC-Platform -Wno-dev -DCONTAINERIZED=1 -DINCLUDE_PLUGINS=1 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DUSE_PYTHON2=0
 
 ARG BUILD_THREADS
 RUN if [ -n "${BUILD_THREADS}" ] ; then echo ${BUILD_THREADS} > ~/build_threads; else echo $(nproc) > ~/build_threads ; fi

+ 6 - 0
plugins/py3embed/CMakeLists.txt

@@ -53,9 +53,15 @@ elseif(NOT APPLE)
     set_target_properties(py3embed PROPERTIES NO_SONAME 1)
 endif()
 
+if (CONTAINERIZED)
+install(
+    TARGETS py3embed
+    DESTINATION plugins)
+else()
 install(
     TARGETS py3embed
     DESTINATION versioned/python3)
+endif()
 
 target_link_libraries(py3embed ${Python3_LIBRARIES})
 

+ 7 - 0
plugins/pyembed/CMakeLists.txt

@@ -59,9 +59,16 @@ elseif(NOT APPLE)
     set_target_properties(py2embed PROPERTIES NO_SONAME 1)
 endif()
 
+if (CONTAINERIZED)
+install(
+    TARGETS py2embed
+    DESTINATION plugins)
+else()
 install(
     TARGETS py2embed
     DESTINATION versioned/python2)
+endif()
+
 if(debug_python)
     target_link_libraries(py2embed ${DEBUG_PYTHON2_LIBRARY})
 else()