math/mpgen, symm/multigen: Fix the various build scripts for Python 3.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 4 Oct 2019 14:43:27 +0000 (15:43 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 19:57:33 +0000 (20:57 +0100)
commitb8dc834f00b9f209062a4b2982b5a4a92dc76de4
treed1954186f161de2b7ec04f90107cbb9f24f9f259
parentff0d3013c417be695d550196651e845911209bdd
math/mpgen, symm/multigen: Fix the various build scripts for Python 3.

  * Put parentheses around `print' arguments.

  * Write `raise EXC(VALUE)' rather than `raise EXC, VALUE' to raise
    exceptions.

  * Cope with `xrange' being renamed to `range' in Python 3.

  * Cope with `long' not being a type name in Python 3.

  * Cope with `execfile' not being available in Python 3.

  * Cope with function-object attribute names being renamed in Python 3.

  * Cope with `StringIO' being in `io' rather than `cStringIO' in Python
    3, and with `StringIO.reset' not being available any more.

  * Cope with `itertools.izip' not being available in Python 3.

  * Cope with `OBJ.next' not being available in Python 3.

  * Use an unpleasant hack to inject metaclasses, because the official
    syntax is so different between the two versions.
math/mpgen
symm/multigen