Skip to content

Commit 65bcbe7

Browse files
committed
build: use Python 3.10
Tracks the default used by Bitcoin Core since v29.0: bitcoin/bitcoin#30527 Pin deterministic release to 3.10.18 Use 3.10.11 for Windows build.
1 parent 3df080f commit 65bcbe7

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9
1+
3.10

contrib/build.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ COPY contrib/reproducible-python.diff /opt/reproducible-python.diff
3838
ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
3939
ENV BUILD_DATE="Jan 1 2019"
4040
ENV BUILD_TIME="00:00:00"
41-
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.9.19
41+
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.10.18
4242

4343
ENV LC_ALL=C.UTF-8
4444
ENV LANG=C.UTF-8

contrib/build_bin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else
2121
fi
2222

2323
# We also need to change the timestamps of all of the base library files
24-
lib_dir=$(pyenv prefix)/lib/python3.9
24+
lib_dir=$(pyenv prefix)/lib/python3.10
2525
TZ=UTC find ${lib_dir} -name '*.py' -type f -execdir touch -t "201901010000.00" '{}' \;
2626

2727
# Make the standalone binary

contrib/build_wine.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
set -ex
55

6-
PYTHON_VERSION=3.9.13
6+
# There's no core.msi for newer patch versions
7+
PYTHON_VERSION=3.10.11
78

89
PYTHON_FOLDER="python3"
910
PYHOME="c:/$PYTHON_FOLDER"

docs/development/release-process.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Build everything::
2626

2727
docker run -it --name hwi-builder -v $PWD:/opt/hwi --rm --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh && contrib/build_dist.sh"
2828
docker run -it --name hwi-wine-builder -v $PWD:/opt/hwi --rm --workdir /opt/hwi hwi-wine-builder /bin/bash -c "contrib/build_wine.sh"
29-
docker run --platform linux/arm64 -it --rm --name hwi-builder-arm64 -v $PWD:/opt/hwi --workdir /opt/hwi hwi-builder-arm64 /bin/bash -c "contrib/build_bin.sh --without-gui && contrib/build_dist.sh --without-gui"
29+
docker run --platform linux/arm64 -it --rm --name hwi-builder-arm64 -v $PWD:/opt/hwi --workdir /opt/hwi hwi-builder-arm64 /bin/bash -c "contrib/build_bin.sh --without-gui && contrib/build_dist.sh --without-gui"
3030

3131
Building macOS binary
3232
=====================
@@ -35,14 +35,14 @@ Note that the macOS build is non-deterministic.
3535

3636
First install `pyenv <https://github.com/pyenv/pyenv>`_ using whichever method you prefer.
3737

38-
Then a deterministic build of Python 3.9.19 needs to be installed. This can be done with the patch in ``contrib/reproducible-python.diff``. First ``cd`` into HWI's source tree. Then use::
38+
Then a deterministic build of Python 3.10.18 needs to be installed. This can be done with the patch in ``contrib/reproducible-python.diff``. First ``cd`` into HWI's source tree. Then use::
3939

40-
cat contrib/reproducible-python.diff | PYTHON_CONFIGURE_OPTS="--enable-framework" BUILD_DATE="Jan 1 2019" BUILD_TIME="00:00:00" pyenv install -kp 3.9.19
40+
cat contrib/reproducible-python.diff | PYTHON_CONFIGURE_OPTS="--enable-framework" BUILD_DATE="Jan 1 2019" BUILD_TIME="00:00:00" pyenv install -kp 3.10.18
4141

42-
Make sure that python 3.9.19 is active::
42+
Make sure that python 3.10.18 is active::
4343

4444
$ python --version
45-
Python 3.9.19
45+
Python 3.10.18
4646

4747
Now install `Poetry <https://github.com/sdispater/poetry>`_ with ``pip install poetry``
4848

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ pyaes = "^1.6"
2323
mnemonic = "~0"
2424
typing-extensions = "^4.4"
2525
libusb1 = ">=1.7,<4"
26-
pyside2 = { version = "^5.14.0", optional = true, python = "<3.10" }
26+
# Used only for Wine
27+
pyside2 = { version = "^5.14.0", optional = true, python = "3.10" }
2728
cbor2 = "^5.4.6"
2829
pyserial = "^3.5"
2930
dataclasses = {version = "^0.8", python = ">=3.6,<3.7"}

0 commit comments

Comments
 (0)