Skip to content

Commit

Permalink
move _raylet
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmoritz committed Jan 25, 2019
1 parent 42db74b commit b2a34fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
12 changes: 1 addition & 11 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html

load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@//bazel:cython_library.bzl", "pyx_library")

cc_binary(
name = "raylet",
Expand All @@ -28,6 +27,7 @@ cc_binary(

cc_library(
name = "raylet_lib",
visibility = ["//visibility:public"],
srcs = glob([
"src/ray/raylet/*.cc"
], exclude = [
Expand Down Expand Up @@ -305,13 +305,3 @@ flatbuffer_cc_library(
flatc_args = FLATC_ARGS,
out_prefix = "src/ray/object_manager/format/",
)

pyx_library(
name = "_raylet",
srcs = glob([
"python/ray/_raylet.pyx",
"python/ray/includes/*.pxd",
"python/ray/includes/*.pxi"
]),
deps = [":raylet_lib"]
)
12 changes: 12 additions & 0 deletions python/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("@//bazel:cython_library.bzl", "pyx_library")

pyx_library(
name = "_raylet",
srcs = glob([
"ray/__init__.py",
"ray/_raylet.pyx",
"ray/includes/*.pxd",
"ray/includes/*.pxi"
]),
deps = ["//:raylet_lib"]
)
14 changes: 7 additions & 7 deletions python/ray/_raylet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ from libcpp.utility cimport pair
from libcpp.unordered_map cimport unordered_map
from libcpp.vector cimport vector as c_vector

from cython.operator import dereference, postincrement
cimport cpython

include "includes/unique_ids.pxi"
include "includes/ray_config.pxi"
include "includes/task.pxi"

from ray.includes.common cimport (
CUniqueID, CTaskID, CObjectID, CFunctionID, CActorClassID, CActorID,
CActorHandleID, CWorkerID, CDriverID, CConfigID, CClientID,
Expand All @@ -22,13 +29,6 @@ from ray.includes.task cimport CTaskSpecification
from ray.includes.ray_config cimport RayConfig
from ray.utils import decode

from cython.operator import dereference, postincrement
cimport cpython

include "includes/unique_ids.pxi"
include "includes/ray_config.pxi"
include "includes/task.pxi"


if cpython.PY_MAJOR_VERSION >= 3:
import pickle
Expand Down

0 comments on commit b2a34fc

Please sign in to comment.