Skip to content

Commit

Permalink
Merge #695: build: Use more recent Python 3.9 for *nix builds
Browse files Browse the repository at this point in the history
e267f9a build: Bump *nix release build environment to more recent 3.9 (Andrew Chow)
dd6a594 build: Allow building binaries on any python 3.9 (Andrew Chow)
e9b3191 pyenv: Set python version to just 3.9 (Andrew Chow)

Pull request description:

  MacOS on Apple Silicon requires a more recent python version, so just bump it to the latest security release of 3.9, and let any 3.9 version when developing in pyenv.

Top commit has no ACKs.

Tree-SHA512: 0552bba9e648225e7cb6c2ba82309c5983d7444fd2a00200ee412d415a9ffbae6aea6ae197c1ac54486c86fcdc5d3e30aae0e0fd0d2bc65a2db9eb62b8e2f6f5
  • Loading branch information
achow101 committed Jul 27, 2023
2 parents 675e346 + e267f9a commit 17d5643
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.7
3.9
2 changes: 1 addition & 1 deletion contrib/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ COPY contrib/reproducible-python.diff /opt/reproducible-python.diff
ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
ENV BUILD_DATE="Jan 1 2019"
ENV BUILD_TIME="00:00:00"
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.9.7
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.9.17

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion contrib/build_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else
fi

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

# Make the standalone binary
Expand Down
8 changes: 4 additions & 4 deletions docs/development/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Note that the macOS build is non-deterministic.

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

Then a deterministic build of Python 3.9.7 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::
Then a deterministic build of Python 3.9.17 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::

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.7
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.17

Make sure that python 3.9.7 is active::
Make sure that python 3.9.17 is active::

$ python --version
Python 3.9.7
Python 3.9.17

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

Expand Down

0 comments on commit 17d5643

Please sign in to comment.