Okay, I found that pyenv can install debug versions (pyenv install X.Y.Z -g).
- It builds versions from source
- so you are responsible for installing binary dependencies from Apt. You can find their list online though.
- Add the resulting installation to Travis cache and use e.g.
pyenv install -sto avoid rebuilding.
- Pyenv identifier for debug versions is
X.Y.Z-debugso it won’t clash with preinstalled alternative versions - Travis has Pyenv installed globally into
/optso need to runpyenv installwithsudo. - Last time I checked,
pipwas unable to install packages for a debug Python – at least, in Windows.