You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/05/21 07:02:49 UTC

[flink-statefun] 01/08: [FLINK-17518] [python] Make Python SDK build script oblivious of working directory

This is an automated email from the ASF dual-hosted git repository.

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit f114019de590f82bf3b7e87039f1ba1d635454e9
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Wed May 20 19:24:34 2020 +0800

    [FLINK-17518] [python] Make Python SDK build script oblivious of working directory
---
 statefun-python-sdk/build-distribution.sh | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/statefun-python-sdk/build-distribution.sh b/statefun-python-sdk/build-distribution.sh
index e68363e..7f7eb31 100755
--- a/statefun-python-sdk/build-distribution.sh
+++ b/statefun-python-sdk/build-distribution.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -15,10 +15,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+CURR_DIR=`pwd`
+BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+###########################
+
+cd ${BASE_DIR}
+
 rm -fr dist
 
 docker run \
-	-v "$(pwd):/app" \
+	-v "$BASE_DIR:/app" \
 	--workdir /app \
 	-i  python:3.7-alpine \
 	python3 setup.py sdist bdist_wheel
@@ -26,4 +33,6 @@ docker run \
 rm -fr apache_flink_statefun.egg-info
 rm -fr build
 
+echo "Built Python SDK wheels and packages at ${BASE_DIR}/dist."
 
+cd ${CURR_DIR}