bpo-30487: automatically create a venv and install Sphinx when running make#1743
bpo-30487: automatically create a venv and install Sphinx when running make#1743cjrh wants to merge 724 commits intopython:masterfrom
Conversation
|
@cjrh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @tiran and @zware to be potential reviewers. |
zware
left a comment
There was a problem hiding this comment.
I haven't tried it out yet, but this looks pretty good. Needs a couple of small tweaks, and should also have an issue on bpo.
Doc/README.rst
Outdated
There was a problem hiding this comment.
Should probably specify that it needs to be Python 3.
Doc/README.rst
Outdated
There was a problem hiding this comment.
s/virtualenv/virtual environment/. "virtualenv" suggests that you need to use the virtualenv tool, which is not true with Python 3. Similarly, "venv" suggests that you need to use the venv module, which won't work on Python 2. The spelled out "virtual environment" should imply that you can use whatever works for you.
Doc/README.rst
Outdated
There was a problem hiding this comment.
Hi @cjrh, Similar to line 95, I would mention changing into the Doc directory before running make html to assist those folks that are newer to Sphinx.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
Something has gone wrong with a merge. I'll need to fix up my PR before we continue. |
14e72b1 to
6802b54
Compare
|
Phew! Just needed some aggressive rebasing and force pushing. Should be good now. |
|
@cjrh Looks like travis is unhappy with a virtual environment within a virtual environment. |
|
I could change it so that if make is being run within a virtual environment, then it doesn't try to make a new one? (Of course, that means that we will not be able to test that it can make a new one successfully in the case that make is being run from a non-virtual environment...🤔) |
|
@cjrh - I followed the new Here's the link to the PR and issue. (python/core-workflow#105) Thanks! |
Doc/README.rst
Outdated
There was a problem hiding this comment.
Is there an extra tick on Doc?
|
@csabella Regarding the problem with wheels: do you mean that when you change into In the Makefile, I can easily change the venv section to read: but I'm unclear of the benefit of installing wheel here (my venv also doesn't get the |
|
@cjrh Thanks, yes, that's what I meant. My assumption was that I got the message because wheel wasn't installed, but there very well could be another reason. In the cherry_picker project, if I installed wheel inside the venv after creating it, then I didn't get the message, as you suggest for a fix. Perhaps this is something specific to me and my path? If it is, then I can work around it. I was just concerned that One point though is that the rest of the make works and the html is still created. Here's is the entire log: |
|
I think we should try to avoid building a venv if |
|
@zware Agreed, I'll get those changes made sometime this week. |
265b12b to
1b9306a
Compare
|
Apologies for the delay on this. @zware: I've changed it so that the auto-venv creation only runs if @csabella: I've also looked into the wheel issue. The problem you're seeing appear to happen because a wheel is being built for the package For me, the This leads me to think that you might have an option in your In any case, if it's happening to you it will likely happen to other people, and there is very little cost to also installing wheel into our venv, so I think I should just add that to the Sphinx install. Agree @zware ? |
|
@csabella Perhaps options similar to these? |
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.
Same change for MB and GB which become MiB and GiB.
Change the output of Tools/iobench/iobench.py.
Round also the size of the documentation from 5.5 MB to 5 MiB.
…uto-venv-docbuilder
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
Welp, that looks bad! My rebase went wrong sigh |
|
Closing this PR and starting again. |
@zware
The changes have been made, and by removing
venvfrom the.PHONYsection in the Makefile, it now works reliably to only create the virtualenv if thevenv/directory doesn't exist.I have also made some edits to the documentation to indicate that Sphinx installation (into a local venv) is now automatic.
Should we be doing more checking to deal with situations where the user overrides
PYTHONand/orSPHINXBUILD? For example, if a user specifies their ownSPHINXBUILD, they may not be too happy that an unnecessary venv is going to get created when they run$ make html...?https://bugs.python.org/issue30487