Commit 10dc90b
authored
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
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments