[python][test] Use python3 in dune_python_add_test
This was hard-coded to python
before but a better default might be python3
since we require Python 3 (According to https://peps.python.org/pep-0394/, python
doesn't even have to exist and if it exists may point to either Python 2 or 3).
This also fixes a problem that came up in !1222 (merged) when trying to use the Dune bindings without a virtual env on a system where python
points to python2
.
Merge request reports
Activity
mentioned in merge request !1222 (merged)
mm this of course fails also for my own second setup described in !1222 (merged) with a separate venv because the python interpreter is then set at configure time. Actually, we probably want there the interpreter of the current environment. I guess this is why is what hard coded to
python
. But isn'tpython3
a better choice?Edited by Timo Koch- Resolved by Timo Koch
@samuel.burbulla Do you see any problems with this? I'm asking because you previously worked on the
dune_python_add_test
a lot.removed bugfix label
assigned to @andreas.dedner
requested review from @samuel.burbulla
added 1 commit
- 63e9efa0 - [python][test] Use python3 instead of python in dune_python_add_test
- Resolved by Timo Koch
- Resolved by Timo Koch
I'm ok with this being merged. However, it is a corner case because you want to run the python tests with a python environment that is configured later but the dune python modules are build with the system python version. This could lead to linkage errors. Nevertheless, I'm fine with this change.
assigned to @tkoch and unassigned @andreas.dedner
@tkoch: I guess it's fine, but I was wanting to wait with the testing until after !1222 (merged) was merged.
mentioned in commit 792d611e