Package ray java jars into wheels (#6600)

This commit is contained in:
chaokunyang
2020-01-10 11:41:00 +08:00
committed by Hao Chen
parent e5dded917c
commit 4097d076d4
8 changed files with 89 additions and 13 deletions
+6 -2
View File
@@ -28,6 +28,10 @@ ray_files = [
"ray/streaming/_streaming.so",
]
build_java = os.getenv("RAY_INSTALL_JAVA") == "1"
if build_java:
ray_files.append("ray/jars/ray_dist.jar")
# These are the directories where automatically generated Python protobuf
# bindings are created.
generated_python_directories = [
@@ -91,7 +95,7 @@ class build_ext(_build_ext.build_ext):
# that certain flags will not be passed along such as --user or sudo.
# TODO(rkn): Fix this.
command = ["../build.sh", "-p", sys.executable]
if os.getenv("RAY_INSTALL_JAVA") == "1":
if build_java:
# Also build binaries for Java if the above env variable exists.
command += ["-l", "python,java"]
subprocess.check_call(command)
@@ -141,7 +145,7 @@ class build_ext(_build_ext.build_ext):
os.makedirs(parent_directory)
if not os.path.exists(destination):
print("Copying {} to {}.".format(source, destination))
shutil.copy(source, destination)
shutil.copy(source, destination, follow_symlinks=True)
class BinaryDistribution(Distribution):