From dae137b9198165677ba9134174d8b59e5a1ce879 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Tue, 24 Nov 2020 17:41:58 -0600 Subject: [PATCH] Don't allow 'optional' files in setup.py (#12359) --- python/setup.py | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/python/setup.py b/python/setup.py index b9e0845de..ef3dc4b18 100644 --- a/python/setup.py +++ b/python/setup.py @@ -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()