mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
make plasma store binary part of the pyarrow package for tests
This commit is contained in:
1 parent
b863d13b58
commit
23fe5f5abc
6 files changed
+12
-6
No files matched your search
@@ -103,6 +103,9 @@ install(FILES
|
||||
protocol.h
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/plasma")
|
||||
|
||||
# Plasma store
|
||||
install(TARGETS plasma_store DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
# pkg-config support
|
||||
configure_file(plasma.pc.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/plasma.pc"
|
||||
|
||||
@@ -21,6 +21,7 @@ includedir=${prefix}/include
|
||||
|
||||
so_version=@PLASMA_SO_VERSION@
|
||||
abi_version=@PLASMA_ABI_VERSION@
|
||||
executable=${prefix}/@CMAKE_INSTALL_BINDIR@/plasma_store
|
||||
|
||||
Name: Plasma
|
||||
Description: Plasma is an in-memory object store and cache for big data.
|
||||
|
||||
@@ -386,3 +386,5 @@ foreach(module ${CYTHON_EXTENSIONS})
|
||||
|
||||
target_link_libraries(${module_name} ${LINK_LIBS})
|
||||
endforeach(module)
|
||||
|
||||
file(COPY ${PLASMA_EXECUTABLE} DESTINATION ${BUILD_OUTPUT_ROOT_DIRECTORY})
|
||||
@@ -29,6 +29,7 @@ include(FindPkgConfig)
|
||||
if ("$ENV{ARROW_HOME}" STREQUAL "")
|
||||
pkg_check_modules(PLASMA plasma)
|
||||
if (PLASMA_FOUND)
|
||||
pkg_get_variable(PLASMA_EXECUTABLE plasma executable)
|
||||
pkg_get_variable(PLASMA_ABI_VERSION plasma abi_version)
|
||||
message(STATUS "Plasma ABI version: ${PLASMA_ABI_VERSION}")
|
||||
pkg_get_variable(PLASMA_SO_VERSION plasma so_version)
|
||||
@@ -40,6 +41,8 @@ if ("$ENV{ARROW_HOME}" STREQUAL "")
|
||||
else()
|
||||
set(PLASMA_HOME "$ENV{ARROW_HOME}")
|
||||
|
||||
set(PLASMA_EXECUTABLE ${PLASMA_HOME}/bin)
|
||||
|
||||
set(PLASMA_SEARCH_HEADER_PATHS
|
||||
${PLASMA_HOME}/include
|
||||
)
|
||||
@@ -73,6 +76,7 @@ endif()
|
||||
if (PLASMA_FOUND)
|
||||
if (NOT Plasma_FIND_QUIETLY)
|
||||
message(STATUS "Found the Plasma core library: ${PLASMA_LIB_PATH}")
|
||||
message(STATUS "Found Plasma executable: ${PLASMA_EXECUTABLE}")
|
||||
endif ()
|
||||
else ()
|
||||
if (NOT Plasma_FIND_QUIETLY)
|
||||
|
||||
@@ -25,7 +25,6 @@ import os
|
||||
import pytest
|
||||
import random
|
||||
import signal
|
||||
import site
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@@ -121,10 +120,7 @@ def start_plasma_store(plasma_store_memory=DEFAULT_PLASMA_STORE_MEMORY,
|
||||
"""
|
||||
if use_valgrind and use_profiler:
|
||||
raise Exception("Cannot use valgrind and profiler at the same time.")
|
||||
module_dir = site.getsitepackages()
|
||||
[plasma_dir] = glob.glob(os.path.join(module_dir[0], "pyarrow*"))
|
||||
plasma_store_executable = os.path.join(os.path.abspath(plasma_dir),
|
||||
"pyarrow/plasma_store")
|
||||
plasma_store_executable = os.path.join(pa.__path__[0], "plasma_store")
|
||||
plasma_store_name = "/tmp/plasma_store{}".format(random_name())
|
||||
command = [plasma_store_executable,
|
||||
"-s", plasma_store_name,
|
||||
|
||||
+1
-1
@@ -275,7 +275,7 @@ class build_ext(_build_ext):
|
||||
# Move the plasma store
|
||||
build_py = self.get_finalized_command('build_py')
|
||||
source = os.path.join(self.build_type, "plasma_store")
|
||||
target = os.path.join(build_lib, build_py.get_package_dir('plasma'), "plasma_store")
|
||||
target = os.path.join(build_lib, build_py.get_package_dir('pyarrow'), "plasma_store")
|
||||
shutil.move(source, target)
|
||||
|
||||
os.chdir(saved_cwd)
|
||||
|
||||
Reference in new issue
Block a user