Development Environment for different versions?

I assume there might be quite a few cases where a developer would want to test something against a version that works, and then against a newer version where it fails.

To try that, I got this advice in a comment:

  1. Get git repo
  2. source ./hacking/env-setup
  3. git checkout <version>
  4. test

But I can’t find anything in the documentation about it.

Also, after setting up a fresh Debian Trixie (13) environment it doesn’t work. I assume it worked in my previous Bookworm (12) setup was because I had older versions of the undocumented requirements installed through system packages, because at some time in the past I was running ansible from system packages.

How would you recommend a fresh install to approach these development requirements?

The docs are here, i just gave you a ‘short version’ earlier.

Also, requirements are part of the repo (test has an additional set in the test subdir)

1 Like

Oh, this is great! If I can use the requirements.txt, I can also use the pyproject.toml. Which means, I don’t have to use the hacking script but can use pip install .

I once did pip install -e . in my ansible/ansible checkout and since then I just use git checkout stable-xxx resp. git checkout devel to switch back and forth between versions.

(Using a venv might be a good idea, obviously :wink: )