Skip to content

Commit 730aac6

Browse files
committed
Add windows wheel CI jobs for py311 & py312
- linting
1 parent 61a68aa commit 730aac6

File tree

3 files changed

+76
-30
lines changed

3 files changed

+76
-30
lines changed

.circleci/config.yml

Lines changed: 71 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,51 @@ common: &common
6767
orbs:
6868
win: circleci/[email protected]
6969

70-
windows_steps: &windows_steps
71-
executor:
72-
name: win/default
73-
shell: bash.exe
74-
working_directory: C:\Users\circleci\project\py-evm
75-
steps:
76-
- checkout
77-
- restore_cache:
78-
keys:
79-
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
80-
- run:
81-
name: install dependencies
82-
command: |
83-
python -m pip install --upgrade pip
84-
python -m pip install tox
85-
- run:
86-
name: run tox
87-
command: python -m tox run -r
88-
- save_cache:
89-
paths:
90-
- .tox
91-
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
70+
windows-wheel-steps:
71+
windows-wheel-setup: &windows-wheel-setup
72+
executor:
73+
name: win/default
74+
shell: bash.exe
75+
working_directory: C:\Users\circleci\project\py-evm
76+
environment:
77+
TOXENV: windows-wheel
78+
restore-cache-step: &restore-cache-step
79+
restore_cache:
80+
keys:
81+
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
82+
install-pyenv-step: &install-pyenv-step
83+
run:
84+
name: install pyenv
85+
command: |
86+
pip install pyenv-win --target $HOME/.pyenv
87+
echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
88+
echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
89+
echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
90+
echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV
91+
echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV
92+
source $BASH_ENV
93+
pyenv update
94+
install-latest-python-step: &install-latest-python-step
95+
run:
96+
name: install latest python version and tox
97+
command: |
98+
LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1)
99+
echo "installing python version $LATEST_VERSION"
100+
pyenv install $LATEST_VERSION
101+
pyenv global $LATEST_VERSION
102+
python3 -m pip install --upgrade pip
103+
python3 -m pip install tox
104+
run-tox-step: &run-tox-step
105+
run:
106+
name: run tox
107+
command: |
108+
echo 'running tox with' $(python3 --version)
109+
python3 -m tox run -r
110+
save-cache-step: &save-cache-step
111+
save_cache:
112+
paths:
113+
- .tox
114+
key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
92115

93116
docs: &docs
94117
docker:
@@ -364,6 +387,18 @@ jobs:
364387
- image: cimg/python:3.11
365388
environment:
366389
TOXENV: py311-wheel
390+
py311-windows-wheel:
391+
<<: *windows-wheel-setup
392+
steps:
393+
- checkout
394+
- <<: *restore-cache-step
395+
- <<: *install-pyenv-step
396+
- run:
397+
name: set minor version
398+
command: echo "export MINOR_VERSION='3.11'" >> $BASH_ENV
399+
- <<: *install-latest-python-step
400+
- <<: *run-tox-step
401+
- <<: *save-cache-step
367402

368403
py312-core:
369404
<<: *common
@@ -407,10 +442,18 @@ jobs:
407442
- image: cimg/python:3.12
408443
environment:
409444
TOXENV: py312-wheel
410-
py312-wheel-windows:
411-
<<: *windows_steps
412-
environment:
413-
TOXENV: py312-wheel-windows
445+
py312-windows-wheel:
446+
<<: *windows-wheel-setup
447+
steps:
448+
- checkout
449+
- <<: *restore-cache-step
450+
- <<: *install-pyenv-step
451+
- run:
452+
name: set minor version
453+
command: echo "export MINOR_VERSION='3.12'" >> $BASH_ENV
454+
- <<: *install-latest-python-step
455+
- <<: *run-tox-step
456+
- <<: *save-cache-step
414457

415458
workflows:
416459
version: 2
@@ -466,4 +509,5 @@ workflows:
466509
- py310-wheel
467510
- py311-wheel
468511
- py312-wheel
469-
- py312-wheel-windows
512+
- py311-windows-wheel
513+
- py312-windows-wheel

eth/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def validate_unique(values: Iterable[Any], title: str = "Value") -> None:
179179
)
180180
raise ValidationError(
181181
f"{title} does not contain unique items. Duplicates: "
182-
f"{', '.join((str(value) for value in duplicates))}"
182+
f"{', '.join(str(value) for value in duplicates)}"
183183
)
184184

185185

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ envlist=
77
py{38,39,310,311,312}-transactions
88
py{38,39,310,311,312}-vm
99
py{38,39,310,311,312}-wheel
10-
py312-wheel-windows
10+
windows-wheel
1111
docs
1212
py312-native-blockchain-{ \
1313
metropolis, transition, frontier, homestead, tangerine_whistle, \
@@ -47,6 +47,7 @@ commands=
4747

4848
basepython =
4949
docs: python
50+
windows-wheel: python
5051
py38: python3.8
5152
py39: python3.9
5253
py310: python3.10
@@ -79,13 +80,14 @@ commands=
7980
python -c "import eth"
8081
skip_install=true
8182

82-
[testenv:py312-wheel-windows]
83+
[testenv:windows-wheel]
8384
deps=
8485
wheel
8586
build[virtualenv]
8687
allowlist_externals=
8788
bash.exe
8889
commands=
90+
python --version
8991
python -m pip install --upgrade pip
9092
bash.exe -c "rm -rf build dist"
9193
python -m build

0 commit comments

Comments
 (0)