mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 17:23:09 +08:00
Don't allow 'optional' files in setup.py (#12359)
This commit is contained in:
+5
-22
@@ -68,9 +68,10 @@ generated_python_directories = [
|
||||
"ray/streaming/generated",
|
||||
]
|
||||
|
||||
optional_ray_files = ["ray/nightly-wheels.yaml"]
|
||||
ray_files.append("ray/nightly-wheels.yaml")
|
||||
|
||||
ray_autoscaler_files = [
|
||||
# Autoscaler files.
|
||||
ray_files += [
|
||||
"ray/autoscaler/aws/defaults.yaml",
|
||||
"ray/autoscaler/azure/defaults.yaml",
|
||||
"ray/autoscaler/_private/azure/azure-vm-template.json",
|
||||
@@ -83,22 +84,12 @@ ray_autoscaler_files = [
|
||||
"ray/autoscaler/ray-schema.json",
|
||||
]
|
||||
|
||||
ray_project_files = [
|
||||
"ray/projects/schema.json",
|
||||
"ray/projects/templates/cluster_template.yaml",
|
||||
"ray/projects/templates/project_template.yaml",
|
||||
"ray/projects/templates/requirements.txt",
|
||||
]
|
||||
|
||||
ray_dashboard_files = [
|
||||
# Dashboard files.
|
||||
ray_files += [
|
||||
os.path.join(dirpath, filename) for dirpath, dirnames, filenames in
|
||||
os.walk("ray/new_dashboard/client/build") for filename in filenames
|
||||
]
|
||||
|
||||
optional_ray_files += ray_autoscaler_files
|
||||
optional_ray_files += ray_project_files
|
||||
optional_ray_files += ray_dashboard_files
|
||||
|
||||
# If you're adding dependencies for ray extras, please
|
||||
# also update the matching section of requirements.txt
|
||||
# in this directory
|
||||
@@ -365,14 +356,6 @@ def pip_run(build_ext):
|
||||
for filename in files_to_include:
|
||||
move_file(build_ext.build_lib, filename)
|
||||
|
||||
# Try to copy over the optional files.
|
||||
for filename in optional_ray_files:
|
||||
try:
|
||||
move_file(build_ext.build_lib, filename)
|
||||
except Exception:
|
||||
print("Failed to copy optional file {}. This is ok."
|
||||
.format(filename))
|
||||
|
||||
|
||||
def api_main(program, *args):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
Reference in New Issue
Block a user