Continue debug - python3 locations #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Poetry Lockfile rebuild | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- ci-lockfile | |
jobs: | |
rebuild: | |
name: Lockfile Rebuild | |
runs-on: ${{ matrix.sys.os }} | |
env: | |
# As of 1.2.0b2 poetry tries to access the system Keyring for more actions than it did | |
# before. This causes problems on the Ubuntu CI - but not on Windows - for reasons that | |
# are unclear. (Backend installed but not running? System not capable of prompting a | |
# user to login to unlock the keychain as it's a CI system?) | |
# | |
# @see https://github.com/python-poetry/poetry/issues/1917 | |
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring | |
# According to MSys2's list of known issues (https://www.msys2.org/docs/python/#known-issues), | |
# setuptools >= 60.0 is not compatible with MSys2 (or vice-versa). | |
# `SETUPTOOLS_USE_DISTUTILS=stdlib` is the recommended work-around. | |
SETUPTOOLS_USE_DISTUTILS: stdlib | |
defaults: | |
run: | |
shell: ${{ matrix.sys.shell }} | |
strategy: | |
fail-fast: false | |
matrix: | |
sys: | |
#~ - os: windows-latest | |
#~ shell: msys2 {0} | |
#~ - os: ubuntu-latest | |
#~ shell: bash | |
- os: macos-latest | |
shell: bash | |
poetVers: | |
- 1.7.1 | |
#~ - 1.7.0 | |
#~ - 1.6.1 | |
#~ - 1.6.0 | |
#~ - 1.5.1 | |
#~ - 1.5.0 | |
#~ - 1.4.2 | |
#~ - 1.4.1 | |
#~ - 1.4.0 | |
#~ - 1.3.1 | |
#~ - 1.3.0 | |
#~ - 1.2.2 | |
steps: | |
# This should closely mirror the msys2-ci workflow file | |
- name: Install and Configure Msys2 | |
if: ${{ startsWith(matrix.sys.os, 'windows') }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ucrt64 | |
update: true | |
install: > | |
git | |
pacboy: > | |
cairo:p | |
gcc:p | |
gobject-introspection:p | |
gstreamer:p | |
gst-plugins-good:p | |
liblo:p | |
ninja:p | |
pkgconf:p | |
python-gobject:p | |
python-pip:p | |
python-pyqt5:p | |
qt5-svg:p | |
rtmidi:p | |
- name: Add pip to $PATH | |
if: ${{ startsWith(matrix.sys.os, 'macos') }} | |
run: | | |
which -a pip3 | |
which -a python3 | |
- name: Update pip | |
run: | | |
python3 -m pip install -U pip | |
# poetry requires jsonschema which, as of jsonschema v4.18.0, requires rpds-py, which | |
# requires a rust compiler (unless rpds-py is installed from a wheel, and there isn't one | |
# provided for use with MSys2 on Windows). | |
# | |
# Besides the question of why one should need a rust compiler to build a python package, | |
# as this is only a build-time dependancy, we should be able to satisfy poetry's requirement | |
# by specifying a version, and hope that pip doesn't try to update it to a newer version. | |
- name: Pin jsonschema | |
if: ${{ startsWith(matrix.sys.os, 'windows') }} | |
run: | | |
pip3 install "jsonschema<4.18.0" | |
- name: Install Poetry via pip | |
run: | | |
python3 -m pip install poetry==${{ matrix.poetVers }} | |
python3 -m pip list | grep poetry | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
# Without this, we get a series of "MaxRetryError" errors when rebuilding the lockfile on | |
# Windows, seemingly caused by not being able to verify certificates. | |
# | |
# The VM version of git appears to be configured to use a file that may assist with this, | |
# however attempting to tell the MSys2 version of git to use the exact same config fails | |
# with the same error. | |
# | |
# I suspect that this may be some fault or shortcoming in Dulwich, which is what poetry uses | |
# instead of querying the git client. | |
# | |
# We still need to install a version of git via MSys2, as a git client is needed to clone | |
# dependencies not available via pip, and the VM version of git can seemingly not be found | |
# when inside an MSys2 shell. | |
- name: Force system git client | |
if: ${{ startsWith(matrix.sys.os, 'windows') }} | |
run: | | |
poetry config experimental.system-git-client true | |
- name: Rebuild lockfile | |
run: | | |
poetry lock -v | |
# Each of the jobs *should* generate the same (platform-agnostic) lockfile. | |
# However they might not, so upload all of them for comparison. | |
- name: Upload lockfile | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.sys.os }}__${{ matrix.poetVers }}__poetry.lock | |
path: poetry.lock |