Skip to content

Commit

Permalink
dep tests: 'python setup.py --version' is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
arjun024 committed Jun 6, 2024
1 parent f0dfcaa commit 709e40d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 1 addition & 6 deletions dependency/test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ docker run -it \
ubuntu:jammy \
bash

# Now on the container
# This is not required on Github Actions Virtual Environments
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md
apt-get update && apt-get install python3 -y

# Passing
$ /tmp/test/test.sh \
--tarballPath /tmp/output_dir/pip_22.2.2_noarch_ff717ff0.tgz \
Expand All @@ -29,4 +24,4 @@ $ /tmp/test/test.sh \
tarballPath=/tmp/output_dir/pip_22.2.2_noarch_ff717ff0.tgz
expectedVersion=999.999.999
Version 22.2.2 does not match expected version 999.999.999
```
```
4 changes: 1 addition & 3 deletions dependency/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ check_version() {
expected_version="${new_expected_version}"
fi

actual_version="$(python3 ./pip/setup.py --version)"
actual_version="$(grep -e "^Version:" pip/PKG-INFO | awk -F ': ' '{print $2}')"
if [[ "${actual_version}" != "${expected_version}" ]]; then
echo "Version ${actual_version} does not match expected version ${expected_version}"
exit 1
Expand Down Expand Up @@ -68,8 +68,6 @@ main() {
echo "tarballPath=${tarballPath}"
echo "expectedVersion=${expectedVersion}"

apt-get update && apt-get install python3-setuptools -y

extract_tarball "${tarballPath}"
check_version "${expectedVersion}"

Expand Down

0 comments on commit 709e40d

Please sign in to comment.