diff --git a/coordinator/gscoordinator/template/CMakeLists.template b/coordinator/gscoordinator/template/CMakeLists.template index 6d8a71cff069..cfc44958c23a 100644 --- a/coordinator/gscoordinator/template/CMakeLists.template +++ b/coordinator/gscoordinator/template/CMakeLists.template @@ -291,6 +291,7 @@ endif() # address the "illegal thread local variable reference to regular symbol" error # in recent version of brew installed protobuf on MacOS set(BUNDLED_Protobuf_LIBRARIES) +set(BUNDLED_Protobuf_LIBRARIES_DLC) # generated by delocate-wheel, see also: https://github.com/matthew-brett/delocate/issues/150 if (APPLE) # find bundled protobuf library if (EXISTS "${ANALYTICAL_ENGINE_HOME}/lib/libprotobuf.dylib") @@ -303,6 +304,7 @@ if (APPLE) file(GLOB PROTOBUF_LIBS "${ANALYTICAL_ENGINE_HOME}/../graphscope.dylibs/libprotobuf.*.dylib") if (PROTOBUF_LIBS) list(GET PROTOBUF_LIBS 0 BUNDLED_Protobuf_LIBRARIES) + string(REPLACE "${ANALYTICAL_ENGINE_HOME}/../" "/DLC/" BUNDLED_Protobuf_LIBRARIES_DLC ${BUNDLED_Protobuf_LIBRARIES}) endif() endif() if (NOT BUNDLED_Protobuf_LIBRARIES) @@ -310,6 +312,7 @@ if (APPLE) file(GLOB PROTOBUF_LIBS "${ANALYTICAL_ENGINE_HOME}/../graphscope_runtime/.dylibs/libprotobuf.*.dylib") if (PROTOBUF_LIBS) list(GET PROTOBUF_LIBS 0 BUNDLED_Protobuf_LIBRARIES) + string(REPLACE "${ANALYTICAL_ENGINE_HOME}/../" "/DLC/" BUNDLED_Protobuf_LIBRARIES_DLC ${BUNDLED_Protobuf_LIBRARIES}) endif() endif() if (NOT BUNDLED_Protobuf_LIBRARIES) @@ -323,6 +326,7 @@ if (APPLE) endif() endif() message(STATUS "Using BUNDLED_Protobuf_LIBRARIES: ${BUNDLED_Protobuf_LIBRARIES}") + message(STATUS "Using BUNDLED_Protobuf_LIBRARIES_DLC: ${BUNDLED_Protobuf_LIBRARIES_DLC}") endif() set(GRAPH_TYPE "$_graph_type") @@ -459,6 +463,14 @@ endif () if (APPLE AND BUNDLED_Protobuf_LIBRARIES) target_link_libraries(${FRAME_NAME} ${BUNDLED_Protobuf_LIBRARIES}) + + if (BUNDLED_Protobuf_LIBRARIES_DLC) + add_custom_command(TARGET ${FRAME_NAME} + POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change + "${BUNDLED_Protobuf_LIBRARIES_DLC}" "${BUNDLED_Protobuf_LIBRARIES}" + $ + ) + endif () endif () # include the inplace cmake config at the end, to avoid affecting the CMake search path diff --git a/coordinator/pyproject.toml b/coordinator/pyproject.toml new file mode 100644 index 000000000000..69b163f11ae4 --- /dev/null +++ b/coordinator/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 88 +exclude = '.*\/(forward|node_modules|\.eggs|build|_pb2\.py)\/.*'