Skip to content

Commit 4b509a7

Browse files
authored
Test to catch if files are missing from a release (#3046)
* Test release in a new directory and virtual environment * Add newsfragment * Add shebang and set -e
1 parent 58195db commit 4b509a7

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

MANIFEST.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
include LICENSE
21
include VERSION
32
include README.md
4-
include requirements.txt
53

64
recursive-exclude * __pycache__
75
recursive-exclude * *.py[co]
86

97
recursive-include ens/specs *
108

11-
recursive-include ethpm/assets/ *
9+
recursive-include ethpm/assets *
1210
recursive-include ethpm/ethpm-spec/examples *
1311
recursive-include ethpm/ethpm-spec/spec *

newsfragments/3046.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test wheel build in separate directory and virtualenv

tox.ini

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,9 @@ deps=
7979
allowlist_externals=
8080
/bin/rm
8181
/bin/bash
82+
/bin/mktemp
8283
commands=
83-
pip install --upgrade pip
84-
/bin/rm -rf build dist
85-
python -m build
86-
/bin/bash -c 'pip install --upgrade "$(ls dist/web3-*-py3-none-any.whl)" --progress-bar off'
87-
python -c "from web3 import Web3"
84+
/bin/bash {toxinidir}/web3/scripts/release/test_wheel_install.sh
8885
skip_install=true
8986

9087
[testenv:py311-wheel-cli-windows]
@@ -94,8 +91,5 @@ deps=
9491
allowlist_externals=
9592
bash.exe
9693
commands=
97-
bash.exe -c "rm -rf build dist"
98-
python -m build
99-
bash.exe -c 'pip install --upgrade "$(ls dist/web3-*-py3-none-any.whl)" --progress-bar off'
100-
python -c "from web3 import Web3"
94+
bash.exe {toxinidir}/web3/scripts/release/test_windows_wheel_install.sh
10195
skip_install=true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -e
4+
rm -rf build dist
5+
python -m build
6+
cd $(mktemp -d)
7+
python -m venv venv-test
8+
source venv-test/bin/activate
9+
pip install --upgrade "$(ls ~/repo/dist/web3-*-py3-none-any.whl)"
10+
python -c "import web3"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
bash.exe -c "set -e"
4+
bash.exe -c "rm -rf build dist"
5+
python -m build
6+
bash.exe -c "export temp_dir=$(mktemp -d)"
7+
cd $temp_dir
8+
python -m venv venv-test
9+
bash.exe -c "source venv-test/Scripts/activate"
10+
bash.exe -c 'pip install --upgrade "$(ls /c/Users/circleci/project/web3py/dist/web3-*-py3-none-any.whl)" --progress-bar off'
11+
python -c "from web3 import Web3"

0 commit comments

Comments
 (0)