Skip to content

Commit

Permalink
Drop special handling for not yet released cffi. (#234)
Browse files Browse the repository at this point in the history
It does not work and I spent too much time trying to get it working.
So I gave up and decided to wait for a cffi release.
  • Loading branch information
icemac authored Apr 4, 2024
1 parent 1404d28 commit 4b5b69c
Showing 1 changed file with 9 additions and 70 deletions.
79 changes: 9 additions & 70 deletions config/c-code/tests.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,11 @@ jobs:
{% include 'tests-cache.j2' %}

{% if with_future_python %}
- name: Install Build Dependencies (%(future_python_version)s) - no Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& !startsWith(runner.os, 'Windows')
run: |
pip install -U pip
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
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 (%(future_python_version)s) - on Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& startsWith(runner.os, 'Windows')
- name: Install Build Dependencies (%(future_python_version)s)
if: matrix.python-version == '%(future_python_version)s'
run: |
# 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
set PIP_CONSTRAINT=%cd%\cffi_constraint.txt
pip install cffi
pip install -U pip
pip install -U setuptools wheel twine
pip install -U setuptools wheel twine cffi
{% endif %}
- name: Install Build Dependencies
{% if with_future_python %}
Expand Down Expand Up @@ -176,30 +158,12 @@ jobs:
{% endfor %}

{% if with_future_python %}
- name: Install %(package_name)s and dependencies (%(future_python_version)s) - no Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& !startsWith(runner.os, 'Windows')
- name: Install %(package_name)s and dependencies (%(future_python_version)s)
if: matrix.python-version == '%(future_python_version)s'
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_CONSTRAINT=$PWD/cffi_constraint.txt pip install --pre .[test]
- name: Install %(package_name)s and dependencies (%(future_python_version)s) - on Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& startsWith(runner.os, 'Windows')
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
set PIP_CONSTRAINT=%cd%\cffi_constraint.txt
pip install --pre .[test]
{% endif %}
- name: Install %(package_name)s and dependencies
Expand Down Expand Up @@ -283,35 +247,11 @@ jobs:
{% endfor %}
{% else %}
{% if with_future_python %}
- name: Install %(package_name)s %(future_python_version)s ${{ matrix.python-version }}- no Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& !startsWith(runner.os, 'Windows')
run: |
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
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
# Unzip into src/ so that testrunner can find the .so files
# when we ask it to load tests from that directory. This
# might also save some build time?
unzip -n dist/%(package_name)s-*whl -d src
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
PIP_CONSTRAINT=$PWD/cffi_constraint.txt pip install --pre -U -e .[test]
- name: Install %(package_name)s %(future_python_version)s - on Windows
if: >
matrix.python-version == '%(future_python_version)s'
&& startsWith(runner.os, 'Windows')
- name: Install %(package_name)s %(future_python_version)s ${{ matrix.python-version }}
if: matrix.python-version == '%(future_python_version)s'
run: |
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
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
# coverage might have 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
# Unzip into src/ so that testrunner can find the .so files
Expand All @@ -320,8 +260,7 @@ jobs:
unzip -n dist/%(package_name)s-*whl -d src
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
set PIP_CONSTRAINT=%cd%\cffi_constraint.txt
pip install --pre -U -e .[test]
txt pip install --pre -U -e .[test]
{% endif %}
- name: Install %(package_name)s
{% if with_future_python %}
Expand Down

0 comments on commit 4b5b69c

Please sign in to comment.