pythonpython-sphinxsphinx-apidoc

sphinx-apidoc -F -o <output_dir> <project_dir> failing to create make file:


I'm attempting to use Sphinx to document a Python library I've been working on. I've been using this post as a rough guide along the way. But, I'm having issues getting Sphinx to work correctly.

Once everything is set up, Sphinx has been installed, and I've added documentation to my code I enter from the root of my project:

sphinx-apidoc -F -o docs/ mypackage/

Output:

Creating file docs/mypackage.rst.
Creating file docs/mypackage.helpers.rst.
Creating file docs/conf.py.
Creating file docs/index.rst.
Creating file docs/Makefile.
Creating file docs/make.bat.

Next, I edit docs/conf.py respectively ensuring that my sys.path.insert(0, os.path.abspath('/Users//path/to/mypackage')) is correct.

However, when I attempt to build the docs (from within the docs directory) via:

build html

I am greeted with:

-bash: make: command not found

I've used sphinx-apidoc and make html with other libraries and never ran into this so I'm sort of at a loss. Any thoughts?


Solution

  • As @Blender stated in the comments. make was not installed. I recently had to reinstall Xcode and forgot to reinstall the command line tools.

    For clarification, I am running OSX 10.8.5.

    To use make first install Xcode via the app store and then open Xcode and download/install the Command Line Tools by navigating to: Xcode->Preferences->Downloads