Package pyarrow along with ray. (#822)

* Rough pass at installing pyarrow along with Ray.

* Remove hardcoded path and try to find correct path automatically.

* Add print.

* Fix linting.

* Copy pyarrow files to a location that we manually add to python path in order to avoid interfering with pre-existing pyarrow installations.

* Move call to build.sh back into build_ext in setup.py.

* Ignore some linting errors.

* Fix problem in which pyarrow files to copy were listed before they were built.

* Fix tests by importing ray before pyarrow.
This commit is contained in:
Robert Nishihara
2017-08-07 21:17:28 -07:00
committed by Philipp Moritz
parent 0e6e38115f
commit 03f2325780
6 changed files with 59 additions and 46 deletions
+13 -4
View File
@@ -2,11 +2,20 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
# Add the directory containing pyarrow to the Python path so that we find the
# pyarrow version packaged with ray and not a pre-existing pyarrow.
pyarrow_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
"pyarrow_files")
sys.path.insert(0, pyarrow_path)
from ray.worker import (register_class, error_info, init, connect, disconnect,
get, put, wait, remote, log_event, log_span,
flush_log, get_gpu_ids)
from ray.worker import SCRIPT_MODE, WORKER_MODE, PYTHON_MODE, SILENT_MODE
from ray.worker import global_state
flush_log, get_gpu_ids) # noqa: E402
from ray.worker import (SCRIPT_MODE, WORKER_MODE, PYTHON_MODE,
SILENT_MODE) # noqa: E402
from ray.worker import global_state # noqa: E402
# We import ray.actor because some code is run in actor.py which initializes
# some functions in the worker.
import ray.actor # noqa: F401
@@ -20,7 +29,7 @@ __all__ = ["register_class", "error_info", "init", "connect", "disconnect",
"flush_log", "actor", "get_gpu_ids", "SCRIPT_MODE", "WORKER_MODE",
"PYTHON_MODE", "SILENT_MODE", "global_state", "__version__"]
import ctypes
import ctypes # noqa: E402
# Windows only
if hasattr(ctypes, "windll"):
# Makes sure that all child processes die when we die. Also makes sure that