mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
update
This commit is contained in:
1 parent
cba92c1059
commit
d4934a9d79
6 files changed
+18
-21
No files matched your search
@@ -80,20 +80,6 @@ python_version_tests() {
|
||||
python setup.py install
|
||||
popd
|
||||
|
||||
# Make python plasma extension
|
||||
pushd $CPP_BUILD_DIR
|
||||
|
||||
cmake -DARROW_BUILD_TESTS=off \
|
||||
-DARROW_PYTHON=on \
|
||||
-DPLASMA_PYTHON=on \
|
||||
-DARROW_PLASMA=on \
|
||||
-DCMAKE_INSTALL_PREFIX=$2 \
|
||||
$CPP_DIR
|
||||
|
||||
make -j4
|
||||
|
||||
popd
|
||||
|
||||
# Build and install plasma
|
||||
pushd $TRAVIS_BUILD_DIR/cpp/src/plasma
|
||||
python setup.py install
|
||||
|
||||
@@ -112,10 +112,12 @@ if (PLASMA_PYTHON)
|
||||
${NUMPY_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
set_source_files_properties(plasma.pyx PROPERTIES CYTHON_IS_CXX 1)
|
||||
set_source_files_properties(plasma/plasma.pyx PROPERTIES CYTHON_IS_CXX 1)
|
||||
|
||||
cython_add_module(plasma
|
||||
plasma_pyx
|
||||
plasma_output
|
||||
plasma.pyx)
|
||||
plasma/plasma.pyx)
|
||||
|
||||
target_link_libraries(plasma arrow_static plasma_static)
|
||||
endif()
|
||||
@@ -0,0 +1 @@
|
||||
from .plasma import *
|
||||
File renamed without changes.
@@ -67,7 +67,7 @@ class build_ext(_build_ext.build_ext):
|
||||
for name in ["plasma"]:
|
||||
built_path = self.get_ext_built(name)
|
||||
if not os.path.exists(built_path):
|
||||
raise RuntimeError('pyarrow C-extension failed to build:',
|
||||
raise RuntimeError('plasma C-extension failed to build:',
|
||||
os.path.abspath(built_path))
|
||||
|
||||
ext_path = os.path.join(build_lib, self._get_cmake_ext_path(name))
|
||||
@@ -79,6 +79,12 @@ class build_ext(_build_ext.build_ext):
|
||||
shutil.move(self.get_ext_built(name), ext_path)
|
||||
self._found_names.append(name)
|
||||
|
||||
# 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")
|
||||
shutil.move(source, target)
|
||||
|
||||
os.chdir(saved_cwd)
|
||||
|
||||
def _get_cmake_ext_path(self, name):
|
||||
@@ -116,7 +122,7 @@ class BinaryDistribution(Distribution):
|
||||
|
||||
setup(name="plasma",
|
||||
version="0.0.1",
|
||||
packages=find_packages(),
|
||||
packages=["plasma"],
|
||||
cmdclass={"build_ext": build_ext},
|
||||
# The BinaryDistribution argument triggers build_ext.
|
||||
distclass=BinaryDistribution,
|
||||
|
||||
@@ -19,10 +19,12 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import glob
|
||||
import numpy as np
|
||||
import os
|
||||
import random
|
||||
import signal
|
||||
import site
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
@@ -113,9 +115,9 @@ 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.")
|
||||
plasma_store_executable = os.path.join(os.path.abspath(
|
||||
os.path.dirname(__file__)),
|
||||
"../../../build/debug/plasma_store")
|
||||
module_dir = site.getsitepackages()
|
||||
[plasma_dir] = glob.glob(os.path.join(module_dir[0], "plasma*"))
|
||||
plasma_store_executable = os.path.join(os.path.abspath(plasma_dir), "plasma/plasma_store")
|
||||
plasma_store_name = "/tmp/plasma_store{}".format(random_name())
|
||||
command = [plasma_store_executable,
|
||||
"-s", plasma_store_name,
|
||||
|
||||
Reference in new issue
Block a user