Skip to content

Commit 10dc90b

Browse files
Use editable pip install to fix testing of cython packages (#173)
In #172 the --no-build-isolation was added, needed to access to petsc etc. packages during build of cython modules, but the -e flag was dropped. It appears that the latter breaks importing a python module with a cython submodule, from the source directory of that python module itself. E.g. if you are in the animate/ source directory, "import animate" in python, it will try to import it from the local directory, but if that module was built without the -e flag, the numbering.cpython-312-x86_64-linux-gnu.so is not available in animate/numbering/ but only in the installed directory (/usr/local/lib/...) and therefore the import will fail on "from .cython.numbering import to_petsc_local_numbering" Therefore you can no longer run pytest within the animate/ directory. With the -e flag, the dynamic .so is placed in animate/numbering/ and it is able to "import animate" from within the local directory, as well as from anywhere else.
1 parent f09b273 commit 10dc90b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/reusable_test_suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
git submodule init
4646
git submodule update
4747
pip uninstall ${REPO_NAME} -y || true
48-
pip install --no-build-isolation .[dev]
48+
pip install --no-build-isolation -e .[dev]
4949
5050
- run: make lint
5151

0 commit comments

Comments
 (0)