python: Fix rich comparisons
authorMathieu Bridon <bochecha@daitauha.fr>
Tue, 17 Jul 2018 20:57:39 +0000 (22:57 +0200)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 7 Aug 2018 20:10:34 +0000 (13:10 -0700)
commite1b88aee680bbdadd283b4a26db74672bb130df5
treeaa7b7026af801eae5202200e5ad10e861a543145
parent9b6746b7c0bef64be419c8cf2ecd916980e2718a
python: Fix rich comparisons

Python 3 doesn't call objects __cmp__() methods any more to compare
them. Instead, it requires implementing the rich comparison methods
explicitly: __eq__(), __ne(), __lt__(), __le__(), __gt__() and __ge__().

Fortunately Python 2 also supports those.

This commit only implements the comparison methods which are actually
used by the build scripts.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/amd/vulkan/radv_extensions.py
src/intel/vulkan/anv_extensions.py
src/mapi/mapi_abi.py