Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx build error #2

Merged
merged 1 commit into from Apr 21, 2015
Merged

Sphinx build error #2

merged 1 commit into from Apr 21, 2015

Conversation

cdeil
Copy link
Contributor

@cdeil cdeil commented Mar 24, 2015

With Python 3.4 and Sphinx 1.3 I get the following error when I try to build the numdifftools docs:

$ python setup.py build_sphinx
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py:291: UserWarning: The version specified ('unknown') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  "details." % self.metadata.version
running build_sphinx
Running Sphinx v1.3
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/numdifftools.rst.
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/numdifftools.tests.rst.
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/modules.rst.
Traceback (most recent call last):
  File "setup.py", line 229, in <module>
    setup_package()
  File "setup.py", line 226, in setup_package
    entry_points={'console_scripts': CONSOLE_SCRIPTS})
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/setup_command.py", line 161, in run
    freshenv=self.fresh_env)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 143, in __init__
    self.setup_extension(extension)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 440, in setup_extension
    ext_meta = mod.setup(self)
  File "/Users/deil/Library/Python/3.4/lib/python/site-packages/numpydoc/numpydoc.py", line 114, in setup
    app.connect('autodoc-process-docstring', mangle_docstrings)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 471, in connect
    self._validate_event(event)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 468, in _validate_event
    raise ExtensionError('Unknown event name: %s' % event)
sphinx.errors.ExtensionError: Unknown event name: autodoc-process-docstring

cc @maniteja123

@cdeil
Copy link
Contributor Author

cdeil commented Mar 19, 2015

@maniteja123 Another thing ... the benchmarks currently don't run under Python 3:

Extracting numdifftools-unknown-py3.4.egg to /Users/deil/Library/Python/3.4/lib/python/site-packages
  File "/Users/deil/Library/Python/3.4/lib/python/site-packages/numdifftools-unknown-py3.4.egg/numdifftools/run_benchmark.py", line 46
    print 'N=', N
             ^
SyntaxError: Missing parentheses in call to 'print'

@pbrod
Copy link
Owner

pbrod commented Mar 20, 2015

Hi,

Thanks. I have fixed this in the new version on github.

Per A.

On 19 March 2015 at 17:53, Christoph Deil notifications@github.com wrote:

@maniteja123 https://github.com/maniteja123 Another thing ... the
benchmarks currently don't run under Python 3:

Extracting numdifftools-unknown-py3.4.egg to /Users/deil/Library/Python/3.4/lib/python/site-packages
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/numdifftools-unknown-py3.4.egg/numdifftools/run_benchmark.py", line 46
print 'N=', N
^
SyntaxError: Missing parentheses in call to 'print'


Reply to this email directly or view it on GitHub
#2 (comment).

@pbrod
Copy link
Owner

pbrod commented Mar 20, 2015

I discovered the same. I am not sure what happened or what is wrong. The
autodoc-process-docstring should work according to the sphinx documentation.

Per A.

On 19 March 2015 at 17:52, Christoph Deil notifications@github.com wrote:

With Python 3.4 and Sphinx 1.3 I get the following error when I try to
build the numdifftools docs:

$ python setup.py build_sphinx
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/dist.py:291: UserWarning: The version specified ('unknown') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version
running build_sphinx
Running Sphinx v1.3
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/numdifftools.rst.
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/numdifftools.tests.rst.
Creating file /Users/deil/code/numdifftools/docs/../docs/_rst/modules.rst.
Traceback (most recent call last):
File "setup.py", line 229, in
setup_package()
File "setup.py", line 226, in setup_package
entry_points={'console_scripts': CONSOLE_SCRIPTS})
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/setup_command.py", line 161, in run
freshenv=self.fresh_env)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 143, in init
self.setup_extension(extension)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 440, in setup_extension
ext_meta = mod.setup(self)
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/numpydoc/numpydoc.py", line 114, in setup
app.connect('autodoc-process-docstring', mangle_docstrings)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 471, in connect
self._validate_event(event)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sphinx/application.py", line 468, in _validate_event
raise ExtensionError('Unknown event name: %s' % event)
sphinx.errors.ExtensionError: Unknown event name: autodoc-process-docstring

cc @maniteja https://github.com/maniteja


Reply to this email directly or view it on GitHub
#2.

@cdeil
Copy link
Contributor Author

cdeil commented Mar 24, 2015

With Google I found the tip that the numpydoc Sphinx extension should be listed at the end.
Attached find a commit that does this.

There's still a ton of Sphinx warnings about missing references:

...
None:None: WARNING: toctree contains reference to nonexisting document '_rst/numdifftools.core.Derivative.finaldelta'
None:None: WARNING: toctree contains reference to nonexisting document '_rst/numdifftools.core.Derivative.__call__'
None:None: WARNING: toctree contains reference to nonexisting document '_rst/numdifftools.core.Derivative.derivative'
None:None: WARNING: toctree contains reference to nonexisting document '_rst/numdifftools.core.Jacobian.delta'
None:None: WARNING: toctree contains reference to nonexisting document '_rst/numdifftools.core.Jacobian.finaldelta'
...

But at lest the Sphinx build puts out html docs now ...

@cdeil cdeil mentioned this pull request Mar 24, 2015
@cdeil
Copy link
Contributor Author

cdeil commented Apr 5, 2015

@pbrod – I currently don't have time to fix the Sphinx warnings. OK to merge this as-is and leave other work to future pull requests? Let me know if there' something you want me to change here.

pbrod added a commit that referenced this pull request Apr 21, 2015
@pbrod pbrod merged commit 8d402c6 into pbrod:master Apr 21, 2015
@pbrod
Copy link
Owner

pbrod commented Apr 21, 2015

Thanks @cdeil

pbrod pushed a commit that referenced this pull request Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants