Skip to content

Fix doc building to use astropy source - #187

Merged
eteq merged 10 commits into
astropy:masterfrom
eteq:docs/build-sphinx-inplace
Apr 9, 2012
Merged

eteq merged 10 commits into
astropy:masterfrom
eteq:docs/build-sphinx-inplace

Conversation

@eteq

@eteq eteq commented Apr 1, 2012

Copy link
Copy Markdown
Member

Fixing this was more subtle than I realized, but this PR now finally makes the sphinx build operate consistently. Now, python setup.py build_sphinx always uses the version of astropy in the build directory, while make html in the docs directory will use the installed version.

As part of this, a critical bug is fixed that in the past meant you had to have the C extensions installed via python setup.py develop or python setup.py build_ext --inplace to get the docs to build. That is no longer the case.

This closes #134 .

@mdboom

mdboom commented Apr 2, 2012

Copy link
Copy Markdown
Contributor

Very welcome change. For me, python setup.py build_sphinx seems to dump the built docs into docs/docs/_build/html rather than docs/_build/html. Any idea why?

@embray

embray commented Apr 2, 2012

Copy link
Copy Markdown
Member

Awesome, thanks for fixing this. I'm seeing the same docs/docs behavior, but otherwise seems good.

We've put a lot of work, I think, into developing workarounds to a lot of the annoyances with Python software builds--it seems almost worth pulling out a lot of Astropy's package framework as a drop-in template to use for arbitrary Python-based projects (we've already done that to an extent with the affiliated package template, thought that's still tied to Astropy). But that's another project for another time :)

@mdboom

mdboom commented Apr 2, 2012

Copy link
Copy Markdown
Contributor

I agree. The infrastructure for this project is really good!

@eteq

eteq commented Apr 3, 2012

Copy link
Copy Markdown
Member Author

The errant 'docs' directory was because I was changing into the docs directory in the subprocess to get it to put the generated docs in the right place... but that meant the directory names from the build_sphinx command were wrong. Fixed by just using all absolute paths computed in the correct places. @iguananaut and @mdboom, can you double-check this fixes it for you?

@iguananaut - Yeah, maybe we should make our own packaging/build tools from scratch and call it distutils3 or packaging2? :) Seriously, though, I agree it could be worth factoring the non-astro stuff out if someone has the time/inclination...

@astrofrog

Copy link
Copy Markdown
Member

This works for me! The docs appear in the right place.

@eteq

eteq commented Apr 9, 2012

Copy link
Copy Markdown
Member Author

Alright, looks like its all building as expected. Merging!

eteq added a commit that referenced this pull request Apr 9, 2012
Fix doc building to use astropy source
@eteq
eteq merged commit 761318d into astropy:master Apr 9, 2012
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
@eteq
eteq deleted the docs/build-sphinx-inplace branch May 3, 2015 17:16
astrofrog pushed a commit to astrofrog/astropy that referenced this pull request Jun 12, 2019
(ports astropy#187 to master)

Conflicts:
	astropy_helpers/test_helpers.py
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.

Use a temporary directory for $HOME/.astropy in config tests

4 participants