Skip to content

Commit

Permalink
fixing site packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nirandaperera committed Sep 12, 2024
1 parent f6655d9 commit f083ad3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 13 additions & 1 deletion cpp/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,19 @@ if (${ARROW_BUILD_TYPE} STREQUAL "SYSTEM")
message(STATUS "Arrow dataset lib: ${ARROW_DATASET_LIB}")

if (PYCYLON_BUILD)
find_library(ARROW_PY_LIB arrow_python ${CYLON_ARROW_VERSION} REQUIRED)
find_package (Python3 COMPONENTS Interpreter)
write_file("find_site_packages.py" [=[import sysconfig; print(sysconfig.get_paths()["purelib"])]=])
execute_process(COMMAND ${Python3_EXECUTABLE} "find_site_packages.py"
RESULT_VARIABLE PROC_RES
OUTPUT_VARIABLE PROC_OUT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if (PROC_RES)
message(FATAL_ERROR "Unable to find python site packages dir: ${PROC_OUT}")
else()
message(STATUS "python site packages dir: ${PROC_OUT}")
endif()
find_library(ARROW_PY_LIB arrow_python PATHS "${PROC_OUT}" PATH_SUFFIXES "pyarrow" REQUIRED NO_DEFAULT_PATH)
message(STATUS "Arrow py lib: ${ARROW_PY_LIB}")
endif (PYCYLON_BUILD)

Expand Down
8 changes: 7 additions & 1 deletion cpp/src/cylon/util/to_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ std::string array_to_string(const std::shared_ptr<arrow::Array> &array, int inde
case arrow::Type::TIMESTAMP:return do_to_string_numeric<arrow::Date64Type>(array, index);
case arrow::Type::TIME32:return do_to_string_numeric<arrow::Time32Type>(array, index);
case arrow::Type::TIME64:return do_to_string_numeric<arrow::Time64Type>(array, index);
case arrow::Type::DECIMAL:break;
case arrow::Type::DECIMAL:
case arrow::Type::LIST:break;
case arrow::Type::STRUCT:break;
case arrow::Type::DICTIONARY:break;
Expand All @@ -70,6 +70,12 @@ std::string array_to_string(const std::shared_ptr<arrow::Array> &array, int inde
case arrow::Type::DENSE_UNION:break;
case arrow::Type::MAX_ID:break;
case arrow::Type::DECIMAL256:break;
case arrow::Type::INTERVAL_MONTH_DAY_NANO:break;
case arrow::Type::RUN_END_ENCODED:break;
case arrow::Type::STRING_VIEW:break;
case arrow::Type::BINARY_VIEW:break;
case arrow::Type::LIST_VIEW:break;
case arrow::Type::LARGE_LIST_VIEW:break;
}
return "NA";
}
Expand Down

0 comments on commit f083ad3

Please sign in to comment.