mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:06:31 +08:00
Package ray java jars into wheels (#6600)
This commit is contained in:
+6
-2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user