Repository navigation
Fix sphinx configuration - #164
Merged
Merged
Conversation
Seems like this is confusing Sphinx in terms of where to look for the Python sources. So if we simply drop this manipulation, this should no longer cause a problem.
Relying on the `setup.py` file to get the version information doesn't seem like a good idea. It also requires `pyfftw` to be built in source to build the docs, which really shouldn't be a requirement. Given `pyfftw.version` will have this information and should be created in source or out-of-source builds, use that instead to extract the version information.
jakirkham
force-pushed
the
fix_sphinx_conf
branch
from
April 4, 2017 18:35
7f60602 to
30cbee4
Compare
jakirkham
commented
Apr 5, 2017
| # add these directories to sys.path here. If the directory is relative to the | ||
| # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
| sys.path.insert(0, os.path.abspath('.')) | ||
| #sys.path.insert(0, os.path.abspath('.')) |
Member
Author
There was a problem hiding this comment.
If we don't like this, we can add a guard that checks the READTHEDOCS environment variable.
Member
Author
|
Please let me know your thoughts on this, @hgomersall. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a couple of things with the configuration file that came up while trying to get ReadTheDocs working.
First it stops adding the current working directory to the path. This ends up resulting in some confusion for Sphinx (with or without ReadTheDocs) in terms of where to import things from. By dropping this path manipulation, Sphinx simply tries to import
pyfftwthe standard way. So if it was installed insite-packages, this will import it from there. Also it works just as well with development installs. Regardless it ensures it is importing only the fully builtpyfftwand not the unbuilt source, which causes problems.Second it gets the version information from
pyfftw.version, which should exist in the fully builtpyfftwinstead of resorting to using thesetup.pyfile. Importing the latter could have all sorts of weird, unintended side effects. The same problems are not true ofpyfftw.version. Thus it works just as well and is cleaner.