From ae97db07c68eebbfed448d6b3bda95f9ad638a1c Mon Sep 17 00:00:00 2001 From: Marcel Martin Date: Fri, 13 Dec 2024 14:26:37 +0100 Subject: [PATCH] Do not run doctests on the wheels To avoid errors like these when cibuildwheel runs pytest on the installed wheel: ``` _____________ ERROR collecting src/cutadapt/cli.py _____________ import file mismatch: imported module 'cutadapt.cli' has this __file__ attribute: .../cutadapt/.venv/lib/python3.12/site-packages/cutadapt/cli.py which is not the same as the test file we want to collect: .../cutadapt/src/cutadapt/cli.py HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules ``` --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3dc1d49c..ff0c0d1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ write_to = "src/cutadapt/_version.py" warn_unused_configs = true [tool.cibuildwheel] -environment = "CFLAGS=-g0" +environment = {"CFLAGS" = "-g0", "PYTEST_ADDOPTS" = "--doctest-ignore-import-errors"} test-extras = ["dev"] test-command = ["pytest {project}"]