From adea1a405752f6af767276fa9ab9efc02c7b4617 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Tue, 17 Dec 2024 22:00:57 +0200 Subject: [PATCH] DOC: mention `--import-mode=importlib` for editable installs No idea what this really does, but apparently it does something. See the discussion around https://github.com/scipy/scipy_doctest/pull/179#issuecomment-2549444952 --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69c8f17..9f6df67 100644 --- a/README.md +++ b/README.md @@ -310,7 +310,10 @@ $ pytest build-install/lib/python3.10/site-packages/scipy/ --doctest-modules instead of `$ pytest --pyargs scipy`. -If push comes to shove, you may try using the magic env variable: +If you use actual editable installs, of the `pip install --no-build-isolation -e .` variety, you may +need to add `--import-mode=importlib` to the `pytest` invocation. + +If push really comes to shove, you may try using the magic env variable: ` PY_IGNORE_IMPORTMISMATCH=1 pytest ...`, however the need usually indicates an issue with the package itself. (see [gh-107](https://github.com/scipy/scipy_doctest/pull/107) for an example).