ci: install poet into the same venv as dsmview, add setuptools

The previous workflow installed homebrew-pypi-poet system-wide while
dsmview lived in a venv, so poet's `import pkg_resources` resolved
against a stripped-down Python that no longer ships setuptools by
default (3.12+).

Consolidate into one step: create the venv, install setuptools/wheel
explicitly, then poet and the project, then run poet from the venv.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jan Vetesnik 2026-06-13 16:57:06 +02:00
parent 498803b116
commit 408d434e3b

View file

@ -19,11 +19,6 @@ jobs:
with:
python-version: '3.12'
- name: Install build tooling
run: |
python -m pip install --upgrade pip
pip install build homebrew-pypi-poet
- name: Compute release metadata
id: meta
run: |
@ -37,17 +32,13 @@ jobs:
echo "tarball_url=${TARBALL_URL}" >> "$GITHUB_OUTPUT"
echo "source_sha=${SOURCE_SHA}" >> "$GITHUB_OUTPUT"
- name: Install dsmview into a venv (for poet)
run: |
python -m venv .poet-venv
. .poet-venv/bin/activate
pip install --upgrade pip
pip install .
- name: Generate Python resource blocks
id: poet
run: |
python -m venv .poet-venv
. .poet-venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install homebrew-pypi-poet .
poet dsmview > resources.rb
echo "--- resources.rb ---"
cat resources.rb