Commit Graph

5 Commits

Author SHA1 Message Date
Oliver Smith b0ba927e33 Revert "Drop python2 support"
This reverts commit fb1dc7c405.

I was under the impression, that all previous scripts were already
working with python 3. But as it turns out, this isn't true. Reverting,
so I can properly post follow-up patches, that fix the issues before we
apply this "drop python2" patch again.

Related: OS#2819
Change-Id: Ic1559d1a9f7839fa86a841d62a04b22e1caed466
2019-12-06 16:06:38 +01:00
Oliver Smith fb1dc7c405 Drop python2 support
Remove all compatibility code for python2.

All scripts are already python 3 compatible since
I80e5850a8978d78cda793e2192ef4bd3fd54a121 and
I1b4a629f12863c498a8681b555f57b4e255cebfb.

dpkg-buildpackage shows that it is still invoking setup.py with python
in addition to python3, on debian stretch. But after spending quite some
time on trying to convince it to not care about python2 without success
(trying different variables, overrides, --without python2 flags etc.),
I'm leaving it as is. The resulting package is the python3 package, which
is what we want.

Related: OS#2819
Change-Id: Iabda95073faa2191fd117e9637e0858c589e9d9e
2019-12-05 13:41:38 +01:00
Oliver Smith 95952909fa scripts/*.py: mark as executable
osmo-mgw's configure.ac won't find osmotestvty.py, unless it is
executable. This allows passing its ./configure with placing the scripts
dir of osmo-python-tests in PATH, instead of installing it.

Change-Id: If6cefd32d0dc544093db08efc114db86b9bb18b0
2018-12-13 13:12:57 +01:00
Max 2f266e0cec Improve python3 compatibility
Use proper print() function to make scripts compatible with both python
2 and 3. This paves the way to deprecating python 2 support altogether.

Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121
2018-01-05 10:15:47 +00:00
Max 120075a6a5 Move scripts to appropriate directory
Having the scripts in the same directory with library code means that
it'll be installed unconditionally regardless of version check in
setup.py which makes it impossible to write separate tests for python 2
and 3. Fix this by moving the scripts into separate directory and
adjusting init and setup files accordingly.

This is necessary for implementing proper CI tests in follow-up patches.

Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db
2017-12-18 13:12:08 +01:00