Skip to content

Commit

Permalink
- update meta/config to publish Windows wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed May 18, 2024
1 parent de7c521 commit 87516c5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ source =
[report]
show_missing = true
precision = 2
ignore_errors = True
exclude_lines =
except ImportError:
if __name__ == '__main__':
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13.0-alpha - 3.13.0"
- "3.13"
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
Expand All @@ -121,6 +121,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
###
# Caching.
# This actually *restores* a cache and schedules a cleanup action
Expand Down Expand Up @@ -157,13 +158,13 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install Build Dependencies (3.13.0-alpha - 3.13.0)
if: matrix.python-version == '3.13.0-alpha - 3.13.0'
- name: Install Build Dependencies (3.13)
if: matrix.python-version == '3.13'
run: |
pip install -U pip
pip install -U setuptools wheel twine
- name: Install Build Dependencies
if: matrix.python-version != '3.13.0-alpha - 3.13.0'
if: matrix.python-version != '3.13'
run: |
pip install -U pip
pip install -U setuptools wheel twine
Expand Down Expand Up @@ -207,15 +208,15 @@ jobs:
python setup.py build_ext -i
python setup.py bdist_wheel
- name: Install zope.interface and dependencies (3.13.0-alpha - 3.13.0)
if: matrix.python-version == '3.13.0-alpha - 3.13.0'
- name: Install zope.interface and dependencies (3.13)
if: matrix.python-version == '3.13'
run: |
# Install to collect dependencies into the (pip) cache.
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
pip install --pre .[test]
- name: Install zope.interface and dependencies
if: matrix.python-version != '3.13.0-alpha - 3.13.0'
if: matrix.python-version != '3.13'
run: |
# Install to collect dependencies into the (pip) cache.
pip install .[test]
Expand Down Expand Up @@ -250,6 +251,19 @@ jobs:
with:
name: zope.interface-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/*whl
- name: Publish package to PyPI (Windows)
uses: pypa/gh-action-pypi-publish@release/v1
if: >
github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Windows')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.13')
with:
user: __token__
password: ${{ secrets.TWINE_PASSWORD }}
skip-existing: true
packages-dir: dist/
- name: Publish package to PyPI (mac)
# We cannot 'uses: pypa/gh-action-pypi-publish@v1.4.1' because
# that's apparently a container action, and those don't run on
Expand All @@ -259,7 +273,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.13.0-alpha - 3.13.0')
&& !startsWith(matrix.python-version, '3.13')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -279,7 +293,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13.0-alpha - 3.13.0"
- "3.13"
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
Expand All @@ -297,6 +311,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
###
# Caching.
# This actually *restores* a cache and schedules a cleanup action
Expand Down Expand Up @@ -395,6 +410,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
###
# Caching.
# This actually *restores* a cache and schedules a cleanup action
Expand Down Expand Up @@ -463,6 +479,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
###
# Caching.
# This actually *restores* a cache and schedules a cleanup action
Expand Down Expand Up @@ -533,6 +550,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
###
# Caching.
# This actually *restores* a cache and schedules a cleanup action
Expand Down Expand Up @@ -611,5 +629,5 @@ jobs:
with:
user: __token__
password: ${{ secrets.TWINE_PASSWORD }}
skip_existing: true
packages_dir: wheelhouse/
skip-existing: true
packages-dir: wheelhouse/
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "d00a7004"
commit-id = "761944d0"

[python]
with-appveyor = true
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
6.5 (unreleased)
================

- Publish missing Windows wheels.
(`#295 <https://github.com/zopefoundation/zope.interface/issues/295>`_)


6.4 (2024-05-15)
================
Expand Down

0 comments on commit 87516c5

Please sign in to comment.