derrickaw commented on code in PR #38696:
URL: https://github.com/apache/beam/pull/38696#discussion_r3304228138
##########
sdks/python/build.gradle:
##########
@@ -124,10 +124,36 @@ tasks.register("generateYamlDocs") {
outputs.file "${buildDir}/yaml-examples.html"
}
+tasks.register("installYamlIntegrationTestDeps") {
+ dependsOn installGcpTest
+ doLast {
+ exec {
+ executable 'sh'
+ args '-c', ". ${envdir}/bin/activate && " +
+ "py_ver=\$(python -c 'import sys;
print(f\"{sys.version_info.major}{sys.version_info.minor}\")') && " +
+ "ml_extra=\"ml_test\" && " +
+ "if [ \"\$py_ver\" -ge 313 ]; then
ml_extra=\"p\${py_ver}_ml_test\"; fi && " +
+ "constraint_file=\"\" && " +
+ "if [ -f
\"container/ml/py\${py_ver}/base_image_requirements.txt\" ]; then " +
+ "
constraint_file=\"container/ml/py\${py_ver}/base_image_requirements.txt\"; " +
+ "elif [ -f
\"container/py\${py_ver}/base_image_requirements.txt\" ]; then " +
+ "
constraint_file=\"container/py\${py_ver}/base_image_requirements.txt\"; " +
+ "fi && " +
+ "if [ -n \"\$constraint_file\" ]; then " +
+ " echo \"Installing with constraint file: \$constraint_file\"
&& " +
+ " pip install --pre --retries 10 -c \"\$constraint_file\"
\${buildDir}/apache-beam.tar.gz[\$ml_extra,yaml,transformers]; " +
+ "else " +
+ " echo \"No constraint file found, installing without
constraints\" && " +
+ " pip install --pre --retries 10
\${buildDir}/apache-beam.tar.gz[\$ml_extra,yaml,transformers]; " +
+ "fi"
Review Comment:
thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]