From 2ca5c116750b347fa6c4fa228c90a1f9de53b9f9 Mon Sep 17 00:00:00 2001 From: danfengliu Date: Thu, 3 Sep 2020 11:42:46 +0800 Subject: [PATCH] Fix git action CI missing python sit packages issue Signed-off-by: danfengliu --- tests/ci/api_common_install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/ci/api_common_install.sh b/tests/ci/api_common_install.sh index 02c4851c5..ebe12bf0e 100755 --- a/tests/ci/api_common_install.sh +++ b/tests/ci/api_common_install.sh @@ -25,7 +25,10 @@ sudo wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py && su sudo make swagger_client #TODO: Swagger python package used to installed into dist-packages, but it's changed into site-packages all in a sudden, we havn't found the root cause. # so current workround is to copy swagger packages from site-packages to dist-packages. -sudo cp -r /usr/lib/python3.7/site-packages/* /usr/local/lib/python3.7/dist-packages +package_dir=/usr/lib/python3.7/site-packages +if [ $(find $package_dir -type f| wc -l) -gt 0 ];then + sudo cp -r ${package_dir}/* /usr/local/lib/python3.7/dist-packages +fi if [ $GITHUB_TOKEN ]; then