Skip to content

Commit

Permalink
Merge pull request #7880 from radarhere/cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Mar 15, 2024
2 parents ec3cf2c + e2986e1 commit 786ded0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/test-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Cygwin
uses: egor-tensin/setup-cygwin@v4
uses: cygwin/cygwin-install-action@v4
with:
packages: >
gcc-g++
Expand All @@ -71,7 +71,6 @@ jobs:
make
netpbm
perl
python39=3.9.16-1
python3${{ matrix.python-minor-version }}-cffi
python3${{ matrix.python-minor-version }}-cython
python3${{ matrix.python-minor-version }}-devel
Expand All @@ -89,21 +88,15 @@ jobs:

- name: Select Python version
run: |
ln -sf c:/tools/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/tools/cygwin/bin/python3
- name: Get latest NumPy version
id: latest-numpy
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
python3 -m pip list --outdated | grep numpy | sed -r 's/ +/ /g' | cut -d ' ' -f 3 | sed 's/^/version=/' >> $GITHUB_OUTPUT
ln -sf c:/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/cygwin/bin/python3
- name: pip cache
uses: actions/cache@v4
with:
path: 'C:\cygwin\home\runneradmin\.cache\pip'
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-${{ hashFiles('.ci/install.sh') }}
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
restore-keys: |
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-numpy${{ steps.latest-numpy.outputs.version }}-
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-
- name: Build system information
run: |
Expand All @@ -113,11 +106,6 @@ jobs:
run: |
bash.exe .ci/install.sh
- name: Upgrade NumPy
shell: dash.exe -l "{0}"
run: |
python3 -m pip install -U "numpy<1.26"
- name: Build
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def __array_interface__(self):
pass
else:
if parse_version(numpy.__version__) < parse_version("1.23"):
warnings.warn(e)
warnings.warn(str(e))
raise
new["shape"], new["typestr"] = _conv_type_shape(self)
return new
Expand Down

0 comments on commit 786ded0

Please sign in to comment.