remove Python 2 support from shapes regression test
Python 2 was EOLed in 2020. This change removes the ability to use Python 2 when
running the shapes test.
This is somewhat moot as the Makefile.am targets for this are not really usable
right now (see the commits merged in
7d0bd41a7ccac1d0d992e8c19ce08f62b85b16ad
that improved the situation but still did not make `make check-recursive`
runnable). Nevertheless this at least removes one legacy code path that does not
need to be worked on in future.
Related to #1992.