This PR adds fully support for Python 3, which could solve all those annoying Python 3-related issues (especially on a distro where the default python is 3.x, like Gentoo or Arch. after tired of the temporary #!/usr/bin/env python2 hack.):
45, #49, #58, #59
mentos.py is now made runnable under both Python 2 and 3.
On a system where the default python is 2.x, vendor/pygments-main will be bundled unchanged as before. When the default python is 3.x, the code in vendor/pygments-main will be run through 2to3 after gem installed (just as the installation of Python 3 Pygments did), using ext/extconf.rb.
The only thing I didn't port is the test part, due to the original vendor code is Python 2 only. There's no way to test it on Python 3 without running it through 2to3.
To test it on a Python 3-default system, build and install the gem first, then change a line in popen.rb to something like: (for using the 2to3-ported vendor code)
This PR adds fully support for Python 3, which could solve all those annoying Python 3-related issues (especially on a distro where the default
python
is 3.x, like Gentoo or Arch. after tired of the temporary#!/usr/bin/env python2
hack.):45, #49, #58, #59
mentos.py is now made runnable under both Python 2 and 3.
On a system where the default
python
is 2.x, vendor/pygments-main will be bundled unchanged as before. When the defaultpython
is 3.x, the code in vendor/pygments-main will be run through2to3
after gem installed (just as the installation of Python 3 Pygments did), using ext/extconf.rb.The only thing I didn't port is the test part, due to the original vendor code is Python 2 only. There's no way to test it on Python 3 without running it through
2to3
.To test it on a Python 3-default system, build and install the gem first, then change a line in
popen.rb
to something like: (for using the2to3
-ported vendor code)then all tests shall pass.