Skip to content

Commit

Permalink
Update cffi support
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Mar 14, 2024
1 parent 0582599 commit 50867d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/tests.yml
Expand Up @@ -128,7 +128,7 @@ jobs:
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
Expand All @@ -142,9 +142,8 @@ jobs:
pip install -U setuptools wheel twine
# cffi will probably have no public release until a Python 3.13 beta
# or even RC release, see https://github.com/python-cffi/cffi/issues/23
pip install -U "cffi @ https://github.com/python-cffi/cffi/archive/refs/heads/main.zip"
# twine has no release for 3.13, yet, see https://github.com/pypa/twine/issues/1030
pip install -U "git+https://github.com/pypa/twine.git#egg=twine"
echo "cffi @ git+https://github.com/python-cffi/cffi.git@954cab4f889fb019a7f90df153ee1be501495f58" > cffi_constraint.txt
PIP_CONSTRAINT=$PWD/cffi_constraint.txt pip install cffi
- name: Install Build Dependencies
if: matrix.python-version != '3.13.0-alpha - 3.13.0'
run: |
Expand Down Expand Up @@ -194,9 +193,12 @@ jobs:
if: matrix.python-version == '3.13.0-alpha - 3.13.0'
run: |
# Install to collect dependencies into the (pip) cache.
# cffi will probably have no public release until a Python 3.13 beta
# or even RC release, see https://github.com/python-cffi/cffi/issues/23
echo "cffi @ git+https://github.com/python-cffi/cffi.git@954cab4f889fb019a7f90df153ee1be501495f58" > cffi_constraint.txt
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
pip install --pre .[test]
PIP_CONSTRAINT=$PWD/cffi_constraint.txt pip install --pre .[test]
- name: Install zope.i18nmessageid and dependencies
if: matrix.python-version != '3.13.0-alpha - 3.13.0'
run: |
Expand Down Expand Up @@ -287,7 +289,7 @@ jobs:
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
Expand All @@ -305,7 +307,7 @@ jobs:
pip install -U wheel setuptools
# cffi will probably have no public release until a beta or even RC
# version of Python 3.13, see https://github.com/python-cffi/cffi/issues/23
pip install -U 'cffi @ https://github.com/python-cffi/cffi/archive/refs/heads/main.zip ; platform_python_implementation == "CPython"'
echo 'cffi @ git+https://github.com/python-cffi/cffi.git@954cab4f889fb019a7f90df153ee1be501495f58 ; platform_python_implementation == "CPython"' > cffi_constraint.txt
# coverage has a wheel on PyPI for a future python version which is
# not ABI compatible with the current one, so build it from sdist:
pip install -U --no-binary :all: coverage
Expand All @@ -315,7 +317,7 @@ jobs:
unzip -n dist/zope.i18nmessageid-*whl -d src
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
pip install --pre -U -e .[test]
PIP_CONSTRAINT=$PWD/cffi_constraint.txt pip install --pre -U -e .[test]
- name: Install zope.i18nmessageid
if: ${{ !startsWith(matrix.python-version, '3.13.0-alpha - 3.13.0') }}
run: |
Expand Down Expand Up @@ -382,7 +384,7 @@ jobs:
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
Expand Down Expand Up @@ -433,7 +435,7 @@ jobs:
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
Expand Down Expand Up @@ -486,7 +488,7 @@ jobs:
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .meta.toml
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "e45966cd"
commit-id = "1351c95d"

[python]
with-appveyor = true
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
@@ -1,7 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[bdist_wheel]
universal = 0

[zest.releaser]
create-wheel = no
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -60,7 +60,7 @@ deps =
commands_pre =
commands =
check-manifest
check-python-versions
check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml
python -m build --sdist --no-isolation
twine check dist/*

Expand Down

0 comments on commit 50867d3

Please sign in to comment.