Making docs doesn't seem to use files in the repo, but installed files instead

24 views
Skip to first unread message

Mike Boyle

unread,
Mar 28, 2015, 3:20:07 PM3/28/15
to sy...@googlegroups.com
I'd like to make some minor modifications to some docstrings and submit a pull request.  So I've checked out a copy of the repo, and I go into `doc`, then run `make html`.  Everything seems to work fine, no error messages, and I can open the html files under _build.  Looks good, sympy live works.

But now, when I make some changes and re-run `make html`, nothing happens -- the changes don't propagate to the new doc html files.  I can even `make clean` and `make html` again, but the changes I've made to the docstrings don't show up.  Turns out if I now run `python setup.py install` and `make html` again, the changes do show up.  So evidently, sphinx is finding the code from my installation directory rather than the code directory.  This is annoying and now how I want it to work.  I've also tried

PYTHONPATH=  make html

(The Makefile then prefixes `..` to PYTHONPATH, so I would have guessed that it would just use the actual code files.)  But even this doesn't work.  I wonder if it's related to the fact that I use anaconda.

Is there any way I can force `make html` to use the actual code sitting right there next to it?

Aaron Meurer

unread,
Mar 28, 2015, 4:40:09 PM3/28/15
to sy...@googlegroups.com
Setting PYTHONPATH=.. should do the trick. That will cause Python to
import sympy from that directory. The only thing I can think of is
that somehow .. is referring to a different directory, because it's
relative. Try setting PYTHONPATH to the absolute path to your sympy
directory and see if that works.

As to Anaconda, Anaconda doesn't change anything about how the Python
import system works.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/84bbdd75-fe07-4659-a16f-d85e612dd5c2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mike Boyle

unread,
Mar 28, 2015, 8:37:18 PM3/28/15
to sy...@googlegroups.com
Setting PYTHONPATH=.. should do the trick. That will cause Python to
import sympy from that directory. The only thing I can think of is
that somehow .. is referring to a different directory, because it's
relative. Try setting PYTHONPATH to the absolute path to your sympy
directory and see if that works.

Nope, even the absolute path doesn't seem to do the trick.

I don't think I've done anything weird to my setup, other than using sphinx installed through conda.  I definitely didn't change anything in the sympy source that might affect this.  But if this problem is not reproducible by anyone but me, I can just live with it.
Reply all
Reply to author
Forward
0 new messages