-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-30487: automatically create a venv and install Sphinx when running make #4346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing these comments should be enough to make Travis happy; I'll try to get another look at it after that :)
Doc/Makefile
Outdated
@@ -40,6 +40,7 @@ help: | |||
@echo " serve to serve the documentation on the localhost (8000)" | |||
|
|||
build: | |||
venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a dependency of this target (after the :
on the line above); it's not a command on its own.
Doc/Makefile
Outdated
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb | ||
@echo "The venv has been created in the $(VENVDIR) directory" | ||
@if [ "$(SPHINXBUILD)" == "$(VENVDIR)/bin/sphinx-build" ]; then \ | ||
@echo "The venv has been created in the $(VENVDIR) directory" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message should still go after the actual creation of the venv.
Doc/Makefile
Outdated
$(PYTHON) -m venv $(VENVDIR) | ||
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb | ||
@echo "The venv has been created in the $(VENVDIR) directory" | ||
@if [ "$(SPHINXBUILD)" == "$(VENVDIR)/bin/sphinx-build" ]; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also check whether $(SPHINXBUILD) --version > /dev/null 2>&1
works, and only build the venv if it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed your other comments. The tests pass. This, about checking whether the command runs, is a bit more interesting. Since the venv
Makefile action will only run if the venv dir is absent (is that right?), it means that $(SPHINXBUILD)
could never work, until the venv is created. So to get into the body, we need the situation to be that the venv has just been created. Therefore, (in this situation), $(SPHINXBUILD)
could never work. So why check for it? (fyi all my experience with makefiles has been on this issue; feel free to assume that know very little about how it works :).
The other, separate complication is that blurb
now uses the same venv so we have to be careful to not mess up anything to do with that other tool. I've run make html
several times. It looks ok right now, and the blurb
action appears to work correctly.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I'll try to makes the fixes as soon as I can. Hopefully next day or two. |
8ff7e90
to
bef5c57
Compare
Let me know when you're ready for me to take another look (see @bedevere-bot's message above). |
@zware thx for checking in. You can look now. Note my comment that starts with "I fixed your other comments. The tests pass. ". I was perhaps unclear there, but I'm basically asking: since the Also, it was necessary to change the Next, management of |
Thanks for the patch! |
…n running make (pythonGH-4346)" Fix breakage documented in bpo-32149. This reverts commit d8d6b91.
#1743 went horribly wrong, and there are now too many people automatically subscribed to that PR so I closed it. Now that I've fixed the feature branch, I've reopened the PR here. @zware
https://bugs.python.org/issue30487