diff --git a/src/python/grpcio_testing/MANIFEST.in b/src/python/grpcio_testing/MANIFEST.in new file mode 100644 index 00000000000..39b35652173 --- /dev/null +++ b/src/python/grpcio_testing/MANIFEST.in @@ -0,0 +1,3 @@ +include grpc_version.py +recursive-include grpc_testing *.py +global-exclude *.pyc diff --git a/src/python/grpcio_testing/README.rst b/src/python/grpcio_testing/README.rst new file mode 100644 index 00000000000..c699b80fb67 --- /dev/null +++ b/src/python/grpcio_testing/README.rst @@ -0,0 +1,10 @@ +gRPC Python Testing Package +=========================== + +Testing utilities for gRPC Python + +Dependencies +------------ + +Depends on the `grpcio` package, available from PyPI via `pip install grpcio`. + diff --git a/test/distrib/python/test_packages.sh b/test/distrib/python/test_packages.sh index 6bf49d45b99..755daa10211 100755 --- a/test/distrib/python/test_packages.sh +++ b/test/distrib/python/test_packages.sh @@ -28,10 +28,12 @@ else echo "Testing Python source distribution" ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-[0-9]*.tar.gz) TOOLS_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-tools-[0-9]*.tar.gz) - HEALTH_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-health-checking-[0-9]*.tar.gz) - REFLECTION_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-reflection-[0-9]*.tar.gz) fi +HEALTH_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-health-checking-[0-9]*.tar.gz) +REFLECTION_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-reflection-[0-9]*.tar.gz) +TESTING_ARCHIVES=("$EXTERNAL_GIT_ROOT"/input_artifacts/grpcio-testing-[0-9]*.tar.gz) + VIRTUAL_ENV=$(mktemp -d) virtualenv "$VIRTUAL_ENV" PYTHON=$VIRTUAL_ENV/bin/python @@ -53,13 +55,9 @@ function at_least_one_installs() { at_least_one_installs "${ARCHIVES[@]}" at_least_one_installs "${TOOLS_ARCHIVES[@]}" - -if [[ "$1" == "source" ]] -then - echo "Testing Python health and reflection packages" - at_least_one_installs "${HEALTH_ARCHIVES[@]}" - at_least_one_installs "${REFLECTION_ARCHIVES[@]}" -fi +at_least_one_installs "${HEALTH_ARCHIVES[@]}" +at_least_one_installs "${REFLECTION_ARCHIVES[@]}" +at_least_one_installs "${TESTING_ARCHIVES[@]}" # diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index 846a4153962..2878005bb20 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -99,12 +99,16 @@ then "${PIP}" install grpcio --no-index --find-links "file://$ARTIFACT_DIR/" "${PIP}" install grpcio-tools --no-index --find-links "file://$ARTIFACT_DIR/" - # Build gRPC health-checking source distribution + # Build grpcio_testing source distribution + ${SETARCH_CMD} "${PYTHON}" src/python/grpcio_testing/setup.py sdist + cp -r src/python/grpcio_testing/dist/* "$ARTIFACT_DIR" + + # Build grpcio_health_checking source distribution ${SETARCH_CMD} "${PYTHON}" src/python/grpcio_health_checking/setup.py \ preprocess build_package_protos sdist cp -r src/python/grpcio_health_checking/dist/* "$ARTIFACT_DIR" - # Build gRPC reflection source distribution + # Build grpcio_reflection source distribution ${SETARCH_CMD} "${PYTHON}" src/python/grpcio_reflection/setup.py \ preprocess build_package_protos sdist cp -r src/python/grpcio_reflection/dist/* "$ARTIFACT_DIR"