Skip to content

Commit

Permalink
Be more specific
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <[email protected]>
  • Loading branch information
s0undt3ch committed Nov 26, 2023
1 parent 2bd180f commit 2b935b0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pkg/macos/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,18 @@ fi
#-------------------------------------------------------------------------------
# Removing Unneeded Libraries from Python
#-------------------------------------------------------------------------------
PY_VERSION_MINOR=$($BLD_PY_BIN -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info))')
REMOVE=(
"idlelib"
"test"
"tkinter"
"turtledemo"
)
for i in "${REMOVE[@]}"; do
TEST_DIR="$BUILD_DIR/opt/salt/lib/python3.*/$i"
DIR=$(compgen -G "$TEST_DIR")
if [ -n "$DIR" ]; then
TEST_DIR="$BUILD_DIR/opt/salt/lib/python${PY_VERSION_MINOR}/$i"
if [ -d "$TEST_DIR" ]; then
_msg "Removing $i directory"
rm -rf "$DIR"
if ! compgen -G "$TEST_DIR" > /dev/null; then
_success
else
_failure
fi
rm -rf "$TEST_DIR" && _success || _failure
fi
done

Expand Down

0 comments on commit 2b935b0

Please sign in to comment.