Skip to content

Cannot build devguide in virtual environment on Windows #267

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

Closed
jeff5 opened this issue Sep 27, 2017 · 4 comments
Closed

Cannot build devguide in virtual environment on Windows #267

jeff5 opened this issue Sep 27, 2017 · 4 comments

Comments

@jeff5
Copy link
Contributor

jeff5 commented Sep 27, 2017

On Windows make html does nothing.

There are several problems here:

  1. There's a use of goto inside parenthes. Yeah, it ought to work but it doesn't reliably. In fact, it stops the action dead.
  2. A virtual environment is not set up for you as claimed in the guide.
  3. The python command used is py -3 which ignored the active venv I created. (Not sure why, but it's not how the Unix Makefile works anyway.)

I think that with problem 1 fixed, one could build by installing Sphinx site-wide, but I'd like to follow the sensible advice in section 6.3, and use a virtual environment.

I'll propose you a fix in due course, as much like the Unix Makefile as I can.

@zware
Copy link
Member

zware commented Sep 27, 2017

Have a look at what cpython's Doc/make.bat does, I think it's in better shape than this make.bat is at this point.

@jeff5
Copy link
Contributor Author

jeff5 commented Sep 27, 2017

@zware Thanks. There are some interesting things there, but not the use of a virtual environment.

I'm aiming for as much like the Makefile as possible and otherwise minimum change. (.bats are so fragile.)

I take the hint from this conditional however that if you've defined your own command in SPHINXBUILD we should butt out with our venv.

@zware
Copy link
Member

zware commented Sep 27, 2017

Ah, you're right; we haven't added venv support to Doc/make.bat. Sorry for the red herring :(

Yes, if SPHINXBUILD is set, we should assume the user knows what they're doing and just go with it. Otherwise, I like your plan of trying to match Makefile's behavior as closely as possible.

jeff5 added a commit to jeff5/jython-devguide that referenced this issue Sep 28, 2017
Add to the Windows build script a clause to create and use a virtual
environment and install Sphinx there, comparable with the Unix Makefile.
The user may suppress this behaviour by defining a her preferred command
in the environment variable SPHINXBUILD, as before.
ezio-melotti pushed a commit that referenced this issue Oct 1, 2017
* Build in a virtual environment on Windows (GH-267)

Add to the Windows build script a clause to create and use a virtual
environment and install Sphinx there, comparable with the Unix Makefile.
The user may suppress this behaviour by defining a her preferred command
in the environment variable SPHINXBUILD, as before.

* Simplify wording and add comment following review.

* Always build relative to the directory containing make.bat

Whatever the current directory when invoked, the build takes place into
_build/... in the directory that contains make.bat, and returns to the
invocation directory.

* Properly escape parentheses in the help text.

Previously this disabled subsequent build targets by making "goto end"
accidentally unconditional. We also describe the "check" target.
@jeff5
Copy link
Contributor Author

jeff5 commented Oct 2, 2017

Resolved in #268.

@jeff5 jeff5 closed this as completed Oct 2, 2017
AA-Turner pushed a commit to AA-Turner/devguide that referenced this issue Jun 17, 2022
* Build in a virtual environment on Windows (pythonGH-267)

Add to the Windows build script a clause to create and use a virtual
environment and install Sphinx there, comparable with the Unix Makefile.
The user may suppress this behaviour by defining a her preferred command
in the environment variable SPHINXBUILD, as before.

* Simplify wording and add comment following review.

* Always build relative to the directory containing make.bat

Whatever the current directory when invoked, the build takes place into
_build/... in the directory that contains make.bat, and returns to the
invocation directory.

* Properly escape parentheses in the help text.

Previously this disabled subsequent build targets by making "goto end"
accidentally unconditional. We also describe the "check" target.
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

No branches or pull requests

2 participants