astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
695 stars 396 forks source link

Sphinx build fails with error: can't import astropy.sphinx #478

Closed cdeil closed 9 years ago

cdeil commented 9 years ago

With latest astropy and astropy-helpers I'm getting this error when I try to build the Sphinx docs:

$ python2.7 setup.py build_sphinx
running build_sphinx
running build
running build_py
running egg_info
writing requirements to astroquery.egg-info/requires.txt
writing astroquery.egg-info/PKG-INFO
writing top-level names to astroquery.egg-info/top_level.txt
writing dependency_links to astroquery.egg-info/dependency_links.txt
writing requirements to astroquery.egg-info/requires.txt
writing astroquery.egg-info/PKG-INFO
writing top-level names to astroquery.egg-info/top_level.txt
writing dependency_links to astroquery.egg-info/dependency_links.txt
reading manifest file 'astroquery.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.pyx' under directory 'astroquery'
warning: no files found matching '*.c' under directory 'astroquery'
warning: no files found matching '*' under directory 'scripts'
no previously-included directories found matching 'build'
warning: no previously-included files matching '*.o' found anywhere in distribution
writing manifest file 'astroquery.egg-info/SOURCES.txt'
Running Sphinx v1.2.3
Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/application.py", line 119, in __init__
    self.setup_extension(extension)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/application.py", line 336, in setup_extension
    err)
sphinx.errors.ExtensionError: Could not import extension astropy.sphinx.ext.edit_on_github (exception: No module named sphinx.ext.edit_on_github)
Sphinx Documentation subprocess failed with return code 1

I think I've seen this before, but there doesn't seem to be an astroquery ticket for it. Should we try updating the astropy-helpers?

cdeil commented 9 years ago

This error has also broken the docs build on readthedocs: https://readthedocs.org/builds/astroquery/ i.e. the online astroquery docs are currently outdated "Last built 02 Nov 2014.".

keflavich commented 9 years ago

@cdeil - I have a PR somewhere that updates astropy-helpers, but it has the full commit history brought along, which I don't want. If you can merge in astropy-helpers cleanly in a single commit, that would be very helpful!

cdeil commented 9 years ago

@keflavich The astropy-helpers git sub-project can very easily be updated in a single commit, just copy & paste the commands from here (change to the latest version on PyPI): http://astropy.readthedocs.org/en/latest/development/affiliated-packages.html#updating-to-the-latest-template-files

You mean you tried updating from package-template using a procedure like: http://astropy.readthedocs.org/en/latest/development/affiliated-packages.html#managing-the-template-files-via-git

I've done this twice for Gammapy and it was a huge pain both times, so my suggestion for astroquery would be to switch to copying files over and adjusting them manually ... it's still painful and some work, but for people like me that are not git wizards it works better: http://astropy.readthedocs.org/en/latest/development/affiliated-packages.html#managing-the-template-files-manually

Unfortunately I won't have time to do this for astroquery in the near future.

cdeil commented 9 years ago

Ah ... your PR is #470 ... must have missed it when I did a GH issue search ...

keflavich commented 9 years ago

Well, my new attempt (https://github.com/astropy/astroquery/pull/482) fails with the same error.

cdeil commented 9 years ago

This works for me now ... closing this issue.

Thanks, @keflavich !