From 4477930b6cced153038d34dc761ab1061fd59ff2 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Wed, 26 Jul 2023 16:02:50 -0700 Subject: [PATCH] [distribute] Add LICENSE to python ancillary packages. (#33574) Fix: #33557 ### Testing * Verified through `distribtests_python` that `LICENSE` file exists in both [.tar.gz](https://storage.googleapis.com/grpc-testing-kokoro-prod/test_result_public/prod/grpc/core/pull_request/linux/f69791e2-b7fd-4729-b55e-caca9171a170/1/20230629-092736/github/grpc/artifacts/grpcio-status-1.57.0.dev0.tar.gz) and [.whl](https://storage.googleapis.com/grpc-testing-kokoro-prod/test_result_public/prod/grpc/core/pull_request/linux/f69791e2-b7fd-4729-b55e-caca9171a170/1/20230629-092736/github/grpc/artifacts/grpcio_status-1.57.0.dev0-py3-none-any.whl). --- .../run_tests/artifacts/build_artifact_python.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index a09f25af7ef..ce3cff865ee 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -81,6 +81,21 @@ then export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM="linux-arm" fi +ancillary_package_dir=( + "src/python/grpcio_admin/" + "src/python/grpcio_channelz/" + "src/python/grpcio_csds/" + "src/python/grpcio_health_checking/" + "src/python/grpcio_reflection/" + "src/python/grpcio_status/" + "src/python/grpcio_testing/" +) + +# Copy license to ancillary package directories so it will be distributed. +for directory in "${ancillary_package_dir[@]}"; do + cp "LICENSE" "${directory}" +done + # Build the source distribution first because MANIFEST.in cannot override # exclusion of built shared objects among package resources (for some # inexplicable reason).