Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/3852.internal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tighten the Windows wheel release smoke test so the temporary virtualenv activation, wheel install, and import check run in the same shell session.
28 changes: 21 additions & 7 deletions web3/scripts/release/test_windows_wheel_install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#!/bin/bash

set -euo pipefail

python --version
bash.exe -c "set -e"
bash.exe -c "rm -rf build dist"
rm -rf build dist
python -m build
bash.exe -c "export temp_dir=$(mktemp -d)"
cd $temp_dir

temp_dir=$(mktemp -d)
cd "$temp_dir"
python -m venv venv-test
bash.exe -c "source venv-test/Scripts/activate"
bash.exe -c 'python -m pip install --upgrade "$(ls /c/Users/circleci/project/web3.py/dist/web3-*-py3-none-any.whl)" --progress-bar off'
python -c "from web3 import Web3"
source venv-test/Scripts/activate
python -m pip install --upgrade "$(ls /c/Users/circleci/project/web3.py/dist/web3-*-py3-none-any.whl)" --progress-bar off
python - <<'PY'
import sys
from pathlib import Path

from web3 import Web3
import web3

python_path = str(Path(sys.executable)).replace('\\', '/')
web3_path = str(Path(web3.__file__)).replace('\\', '/')
assert 'venv-test' in python_path, python_path
assert 'venv-test' in web3_path, web3_path
assert Web3 is not None
PY