tvalentyn commented on a change in pull request #15927:
URL: https://github.com/apache/beam/pull/15927#discussion_r749773970



##########
File path: sdks/python/container/run_generate_requirements.sh
##########
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+
+if [[ $# != 2 ]]; then
+  printf "Usage: \n$> ./sdks/python/container/run_generate_requirements.sh 
<python_version> <sdk_tarball>"
+  printf "\n\tpython_version: [required] Python version to generate 
dependencies for."
+  printf " Use 3.7 for Python3.7, 3.8 for Python3.8 etc."
+fi
+
+set -ex
+PY_VERSION=$1
+SDK_TARBALL=$2
+
+ENV_PATH="$PWD/build/python${PY_VERSION/./}_requirements_gen"
+rm -rf $ENV_PATH 2>/dev/null || true
+python${PY_VERSION} -m venv $ENV_PATH
+source $ENV_PATH/bin/activate
+pip install --upgrade pip
+pip install wheel
+
+pip install --no-cache-dir $SDK_TARBALL[gcp,dataframe]
+pip install --no-cache-dir -r 
$PWD/sdks/python/container/base_image_requirements_manual.txt
+pip uninstall -y apache-beam
+echo "Checking for broken dependencies:"
+pip check

Review comment:
       yup, thanks to `set -e`.




-- 
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]


Reply via email to