enthought / codetools

Tools for Python code analysis and execution.
Other
50 stars 9 forks source link

Fix documentation build for Python 3 #32

Open mdickinson opened 5 years ago

mdickinson commented 5 years ago

The documentation doesn't currently build under Python 3. The immediate error is due to use of execfile in the Sphinx configuration, but there may be others.

mirzakhani:docs mdickinson$ make html
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.8.3

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sphinx/config.py", line 368, in eval_config_file
    execfile_(filename, namespace)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "/Users/mdickinson/Enthought/ETS/codetools/docs/source/conf.py", line 44, in <module>
    execfile(os.path.join('..', '..', 'codetools', '__init__.py'), d)
NameError: name 'execfile' is not defined

make: *** [html] Error 2