Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider the following output form `which python3` and `which pytest-3` in the CI environment: which python3 shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.10.15/x64 PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib/pkgconfig Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib /opt/hostedtoolcache/Python/3.10.15/x64/bin/python3 which pytest-3 shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.10.15/x64 PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib/pkgconfig Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib /usr/bin/pytest-3 Since we were getting e.g. cffi vi `apt-get install python3-cffi`, we were using the *system* python's cffi for everything. That worked because we invoked the *system* pytest-3. Of course, that means we were not really using the github python action's python in our CI matrix, since we were always using the system python for everything. Instead, let's set up a venv as a traditional project would, and that way we can explicitly call that venv's python everywhere in the makefile, so we always use that venv's packages and get the right python. Then, we need only be careful to use the $PATH python, not /usr/bin/python, to set up this venv, and we always get the right version of python to test with. This likely explains some weirdness that I've seen in the past, should have investigated sooner... Signed-off-by: Tycho Andersen <[email protected]>
- Loading branch information