Skip to content

Commit 4861887

Browse files
authored
SNOW-1013942: Replace --external_wheels with --installpkg in tox (#1857)
1 parent 1f73394 commit 4861887

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ci/test_darwin.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ gpg --quiet --batch --yes --decrypt --passphrase="${PARAMETERS_SECRET}" ${PARAMS
2121

2222
python3.8 -m venv venv
2323
. venv/bin/activate
24-
pip install tox tox-external_wheels
24+
pip install -U tox>=4
2525

2626
# Run tests
2727
cd $CONNECTOR_DIR
2828
for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
2929
echo "[Info] Testing with ${PYTHON_VERSION}"
3030
SHORT_VERSION=$(python3 -c "print('${PYTHON_VERSION}'.replace('.', ''))")
3131
CONNECTOR_WHL=$(ls ${CONNECTOR_DIR}/dist/snowflake_connector_python*cp${SHORT_VERSION}*.whl)
32-
TEST_ENVLIST=fix_lint,py${SHORT_VERSION}-{unit,integ,pandas,sso}-ci,py${SHORT_VERSION}-coverage
32+
TEST_ENVLIST=$(python3 -c "print('fix_lint,' + ','.join('py${SHORT_VERSION}-' + e + '-ci' for e in ['unit','integ','pandas','sso']) + ',py${SHORT_VERSION}-coverage')")
3333
echo "[Info] Running tox for ${TEST_ENVLIST}"
34-
tox -e ${TEST_ENVLIST} --external_wheels ${CONNECTOR_WHL}
34+
python3 -m tox -e ${TEST_ENVLIST} --installpkg ${CONNECTOR_WHL}
3535
done
3636

3737
deactivate

ci/test_linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1111
CONNECTOR_DIR="$( dirname "${THIS_DIR}")"
1212

1313
# Install one copy of tox
14-
python3 -m pip install -U tox tox-external-wheels
14+
python3 -m pip install -U tox>=4
1515

1616
source ${THIS_DIR}/log_analyze_setup.sh
1717

@@ -40,6 +40,6 @@ else
4040
TEST_ENVLIST=fix_lint,py${SHORT_VERSION}-{unit,integ,pandas,sso}-ci,py${SHORT_VERSION}-coverage
4141
echo "[Info] Running tox for ${TEST_ENVLIST}"
4242

43-
python3 -m tox -e ${TEST_ENVLIST} --external_wheels ${CONNECTOR_WHL}
43+
python3 -m tox -e ${TEST_ENVLIST} --installpkg ${CONNECTOR_WHL}
4444
done
4545
fi

ci/test_windows.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ if %errorlevel% neq 0 goto :error
3636
call %venv_dir%\scripts\activate
3737
if %errorlevel% neq 0 goto :error
3838

39-
python -m pip install -U pip "tox<4" tox-external-wheels
39+
python -m pip install -U pip "tox>=4"
4040
if %errorlevel% neq 0 goto :error
4141

4242
cd %CONNECTOR_DIR%
4343

4444
set JUNIT_REPORT_DIR=%workspace%
4545
set COV_REPORT_DIR=%workspace%
46-
tox -e py%pv%-{unit,integ,pandas,sso}-ci --external_wheels %connector_whl% -- --basetemp=%workspace%\pytest-tmp\
46+
47+
set TEST_ENVLIST=fix_lint,py%pv%-unit-ci,py%pv%-integ-ci,py%pv%-pandas-ci,py%pv%-sso-ci,py%pv%-coverage
48+
tox -e %TEST_ENVLIST% --installpkg %connector_whl% -- --basetemp=%workspace%\pytest-tmp\
4749
if %errorlevel% neq 0 goto :error
4850

4951
call deactivate

0 commit comments

Comments
 (0)