From 33e0bb3ac5ec584d19186d7fa0b32441575ca058 Mon Sep 17 00:00:00 2001 From: Vytautas Liuolia Date: Wed, 17 Apr 2024 16:22:55 +0200 Subject: [PATCH] chore(tox): drop `--no-build-isolation` from Cython tests (#2229) * chore(tox): drop `--no-build-isolation` from Cython tests * chore(tox): fix a couple of PEBCAKs --- tox.ini | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tox.ini b/tox.ini index 67d9d7c7d..8ebde179e 100644 --- a/tox.ini +++ b/tox.ini @@ -170,61 +170,53 @@ commands = python "{toxinidir}/tools/clean.py" "{toxinidir}/falcon" # -------------------------------------------------------------------- [with-cython] +# NOTE(vytas): Specify Cython dep for tests/test_cython.py as PEP 517 build +# does not require it (although Tox seems to inject it in the current impl). deps = -r{toxinidir}/requirements/tests Cython - # NOTE(vytas): By using --no-build-isolation, we need to manage build - # deps ourselves, and on CPython 3.12, it seems even setuptools - # (our PEP 517 backend of choice) is not guaranteed to be there. - setuptools - wheel setenv = PIP_CONFIG_FILE={toxinidir}/pip.conf FALCON_DISABLE_CYTHON= FALCON_ASGI_WRAP_NON_COROUTINES=Y FALCON_TESTING_SESSION=Y PYTHONASYNCIODEBUG=1 -install_command = python -m pip install --no-build-isolation {opts} {packages} commands = pytest tests [] [testenv:py37_cython] basepython = python3.7 -install_command = {[with-cython]install_command} deps = {[with-cython]deps} setenv = {[with-cython]setenv} commands = {[with-cython]commands} [testenv:py38_cython] basepython = python3.8 -install_command = {[with-cython]install_command} deps = {[with-cython]deps} setenv = {[with-cython]setenv} commands = {[with-cython]commands} [testenv:py39_cython] basepython = python3.9 -install_command = {[with-cython]install_command} deps = {[with-cython]deps} setenv = {[with-cython]setenv} commands = {[with-cython]commands} [testenv:py310_cython] basepython = python3.10 -install_command = {[with-cython]install_command} deps = {[with-cython]deps} setenv = {[with-cython]setenv} commands = {[with-cython]commands} [testenv:py311_cython] basepython = python3.11 -install_command = {[with-cython]install_command} deps = {[with-cython]deps} setenv = {[with-cython]setenv} commands = {[with-cython]commands} [testenv:py312_cython] basepython = python3.12 -install_command = {[with-cython]install_command} +# NOTE(vytas): pyximport relies on distutils.extension deps = {[with-cython]deps} + setuptools setenv = {[with-cython]setenv} commands = {[with-cython]commands} @@ -233,7 +225,6 @@ commands = {[with-cython]commands} # -------------------------------------------------------------------- [testenv:wsgi_servers] -install_command = {[with-cython]install_command} setenv = {[with-cython]setenv} deps = {[with-cython]deps} gunicorn