asciidoctor / asciidoctor.org

:globe_with_meridians: Asciidoctor project site. Composed in AsciiDoc. Baked with Awestruct.
https://asciidoctor.org
Other
322 stars 805 forks source link

python, python2.7, but not python2 for Pygments on macOS #776

Closed jlmuir closed 6 years ago

jlmuir commented 6 years ago

In the Pygments section of the user manual, it has an admonition that says:

You must have Python 2 installed. Python 3 is not sufficient to use Pygments with the pygments.rb gem. Check that you have a python2 (Linux, OSX) or py -2 (Windows) binary on your PATH.

Unfortunately, that's not quite right for macOS. On macOS High Sierra (10.13.3), there is no system python2 binary:

$ ls -1 /usr/bin/python*
/usr/bin/python
/usr/bin/python-config
/usr/bin/python2.7
/usr/bin/python2.7-config
/usr/bin/pythonw
/usr/bin/pythonw2.7

As you can see, though, there is a python binary and a python2.7 binary. The python binary is for version 2.7.10:

$ /usr/bin/python -V
Python 2.7.10

I assume Pygments would work fine with these. So, perhaps the admonition should suggest checking for a python2.7 binary on macOS. Or perhaps it should suggest running python -V and ensuring that the version is 2.x. (?)

mojavelinux commented 6 years ago

It was accurate at the time it was written. As you've pointed out, macOS has moved on since then and the instructions now need to be updated.

mojavelinux commented 6 years ago

I've made the update. Basically, you don't have to do anything on macOS since it still uses Python 2 by default. It should just work.