Skip to content

Commit

Permalink
work around cibuildwheel not outputting pip-freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenkov committed May 15, 2023
1 parent eef4177 commit a6cdaa0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
with:
platforms: all

- run: mkdir pip-freeze

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.0
env:
Expand All @@ -55,6 +57,8 @@ jobs:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl

- run: tail -n +1 pip-freeze/*

test:
name: Test wheel for ${{ matrix.os }} Python ${{ matrix.python }}
needs: build_wheels
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pipfreezedammit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Implemented as a Python script because we need it to work on Windows, etc.
"""
import os
import subprocess
import sys
subprocess.call([sys.executable, '-m', 'pip', 'freeze'], stdout=sys.stderr)

pythonversion = f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}'

os.makedirs('pip-freeze', exist_ok=True)
with open(f'pip-freeze/{pythonversion}.txt', 'wt') as fout:
subprocess.call([sys.executable, '-m', 'pip', 'freeze'], stdout=fout)

0 comments on commit a6cdaa0

Please sign in to comment.