You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the changes in PR #321 (18319d5) invokes pip during cmake to install pytest if it isn't found, but this seems conceptually wrong: a cmake invocation really shouldn't be modifying anything outside the project dir.
I propose that this should be changed to produce a fatal error if pytest isn't found (perhaps with a message to invoke pip install pytest or pip install --user pytest), or at the very least protected behind a disabled-by-default PYBIND11_INSTALL_DEPS option. Otherwise we're installing something outside of the pybind11 directory without asking just because someone decides to configure the pybind11 test code build.
(As a side note, even with the option approach, I think the debian builds should go back to install python$PY-pytest instead of python$PY-pip python$PY-setuptools—part of the point of those builds was to install all deps via native system packages rather than via pip; it also ensures that everything works as expected without pip/setuptools available.)
The text was updated successfully, but these errors were encountered:
Agreed, I was surprised by this as well. I'd probably prefer it to just fail if py.test executable is not found (or if ${PYTHON} -m pytest --version fails).
a cmake invocation really shouldn't be modifying anything outside the project dir.
True. In trying to make it more convenient, it may have become too intrusive. I guess failing with a nice error message should be the way to go then. And yeah, at that point the docker build on Travis should switch to the system pytest package.
Slightly off-topic: pip and setuptools are bundled with Python but Linux distributions specifically remove them from their Python packages. Seeing a pure-Python package like pytest as a system package is baffling. System packages used to be a necessary evil for difficult to install stuff like numpy and scipy, but having the entire PyPI catalogue recreated with every distribution's package manager seems counterproductive.
(@dean0x7d)
One of the changes in PR #321 (18319d5) invokes pip during cmake to install pytest if it isn't found, but this seems conceptually wrong: a cmake invocation really shouldn't be modifying anything outside the project dir.
I propose that this should be changed to produce a fatal error if pytest isn't found (perhaps with a message to invoke
pip install pytest
orpip install --user pytest
), or at the very least protected behind a disabled-by-default PYBIND11_INSTALL_DEPS option. Otherwise we're installing something outside of the pybind11 directory without asking just because someone decides to configure the pybind11 test code build.(As a side note, even with the option approach, I think the debian builds should go back to install
python$PY-pytest
instead ofpython$PY-pip python$PY-setuptools
—part of the point of those builds was to install all deps via native system packages rather than viapip
; it also ensures that everything works as expected without pip/setuptools available.)The text was updated successfully, but these errors were encountered: