Skip to content

Commit

Permalink
Move whl check into build-whl.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Sep 21, 2023
1 parent 934425b commit 3867800
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/actions/build-whl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ runs:

- name: Test whl
run: |
unzip -l python/dist/*.whl | tail -n +4 | head -n -2 | sed -E -e "s/^ +//" -e "s/ +/ /g" | cut -d " " -f 4- | grep "^pyspark/jars/" | tee contained-jars.txt
diff --left-column <(cd python; find gresearch -type f | grep -v ".pyc$" | sort) <(unzip -l python/dist/*.whl | tail -n +4 | head -n -2 | sed -E -e "s/^ +//" -e "s/ +/ /g" | cut -d " " -f 4- | sort) | grep "^<" | tee missing-files.txt
[ $(cat contained-jars.txt | wc -l) == "1" ]
[ ! -s missing-files.txt ]
twine check python/dist/*
pip install python/dist/*.whl --find-links https://archive.apache.org/dist/spark/spark-3.5.0
python test-release.py
Expand Down
11 changes: 11 additions & 0 deletions build-whl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ fi
pip install build
python -m build "$base/python/"

# check for missing modules in whl file
pyversion=${version/SNAPSHOT/dev0}
pyversion=${pyversion//-/.}

missing="$(diff <(cd $base/python; find gresearch -type f | grep -v ".pyc$" | sort) <(unzip -l $base/python/dist/pyspark_extension-${pyversion}-*.whl | tail -n +4 | head -n -2 | sed -E -e "s/^ +//" -e "s/ +/ /g" | cut -d " " -f 4- | sort) | grep "^<" || true)"
if [ -n "$missing" ]
then
echo "These files are missing from the whl file:"
echo "$missing"
exit 1
fi

0 comments on commit 3867800

Please sign in to comment.