atk4 / book

4 stars 23 forks source link

Added the executable path for sphinx-build on Linux #41

Open jlinkels opened 8 years ago

jlinkels commented 8 years ago

Hi Romans,

As an exercise I made the smallest possible change in the Books repository. The Book would not compile on Linux because sphinx-build is located in /usr/bin/. Just like on the Mac.

It is the first time I am using git, github and everything hence the exercise and the tiny change in its own branch.

The problem of course is that the sphinx-build location might not be valid for all Linuces. At least it is for Debian and friends.

Kind regards Hans

romaninsh commented 8 years ago

There was some issue with multiple python version but i think we just use sphinx-build for all platforms now.

jlinkels commented 8 years ago

The problem is that the makefile tests if the platform is Darwin.

ifeq ($(UNAME),Darwin)
    SPHINXBUILD   = sphinx-build
else
    SPHINXBUILD   = /usr/lib/python-exec/python2.7/sphinx-build
endif

Then the sphinx-build is expected in the $PATH (usually /usr/bin/) In all other cases it is assumed to be in /usr/lib/python-exec/python2.7/sphinx-build. So it will fail on Linux (at least Debian derivatives)

If you use sphinx-build now on all platforms the test could be omitted.