Skip to content
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

Create Python virtualenv on Windows for docs #5045

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

big-r81
Copy link
Contributor

@big-r81 big-r81 commented May 2, 2024

Add an equivalent setup script for Windows to
init python dev environment for building docs.

Add an equivalent setup script for Windows to
init python dev environment for building docs.
Copy link
Contributor

@nickva nickva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my laptop is I ran ./setup.bat and that worked well it seems, but then ./make.bat html failed with:

Could not import extension sphinx_copybutton

@big-r81
Copy link
Contributor Author

big-r81 commented May 3, 2024

Hey Nick, thanks for testing. I retried it to and it works for me. I deleted the pip cache to get a fresh download of alle wheels.
Maybe the package wasn't completly downloaded when you run the setup.bat?

C:\Users\couchdb\Documents\couchdb\src\docs>setup.bat && make.bat html
Could Not Find C:\Users\couchdb\Documents\couchdb\src\docs\.venv
Requirement already satisfied: pip in c:\users\couchdb\documents\couchdb\src\docs\.venv\lib\site-packages (24.0)
Collecting Sphinx==7.2.6 (from -r requirements.txt (line 1))
  Downloading sphinx-7.2.6-py3-none-any.whl.metadata (5.9 kB)
Collecting sphinx-rtd-theme==2.0.0 (from -r requirements.txt (line 2))
  Downloading sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting sphinxcontrib-httpdomain==1.8.1 (from -r requirements.txt (line 3))
  Downloading sphinxcontrib_httpdomain-1.8.1-py2.py3-none-any.whl.metadata (2.0 kB)
Collecting sphinxcontrib-jquery==4.1 (from -r requirements.txt (line 4))
  Downloading sphinxcontrib_jquery-4.1-py2.py3-none-any.whl.metadata (2.6 kB)
Collecting sphinx-copybutton==0.5.2 (from -r requirements.txt (line 5))
  Downloading sphinx_copybutton-0.5.2-py3-none-any.whl.metadata (3.2 kB)
Collecting sphinxcontrib-applehelp (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_applehelp-1.0.8-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-devhelp (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_devhelp-1.0.6-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-jsmath (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.9 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl.metadata (2.4 kB)
Collecting sphinxcontrib-qthelp (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading sphinxcontrib_qthelp-1.0.7-py3-none-any.whl.metadata (2.2 kB)
Collecting Jinja2>=3.0 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
Collecting Pygments>=2.14 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
Collecting docutils<0.21,>=0.18.1 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading docutils-0.20.1-py3-none-any.whl.metadata (2.8 kB)
Collecting snowballstemmer>=2.0 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl.metadata (6.5 kB)
Collecting babel>=2.9 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading Babel-2.14.0-py3-none-any.whl.metadata (1.6 kB)
Collecting alabaster<0.8,>=0.7 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading alabaster-0.7.16-py3-none-any.whl.metadata (2.9 kB)
Collecting imagesize>=1.3 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading imagesize-1.4.1-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting requests>=2.25.0 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting packaging>=21.0 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
Collecting colorama>=0.4.5 (from Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting six (from sphinxcontrib-httpdomain==1.8.1->-r requirements.txt (line 3))
  Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting MarkupSafe>=2.0 (from Jinja2>=3.0->Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl.metadata (3.1 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.25.0->Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests>=2.25.0->Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading idna-3.7-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.25.0->Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests>=2.25.0->Sphinx==7.2.6->-r requirements.txt (line 1))
  Downloading certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
Downloading sphinx-7.2.6-py3-none-any.whl (3.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 14.6 MB/s eta 0:00:00
Downloading sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl (2.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 29.9 MB/s eta 0:00:00
Downloading sphinxcontrib_httpdomain-1.8.1-py2.py3-none-any.whl (25 kB)
Downloading sphinxcontrib_jquery-4.1-py2.py3-none-any.whl (121 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 6.9 MB/s eta 0:00:00
Downloading sphinx_copybutton-0.5.2-py3-none-any.whl (13 kB)
Downloading alabaster-0.7.16-py3-none-any.whl (13 kB)
Downloading Babel-2.14.0-py3-none-any.whl (11.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.0/11.0 MB 28.4 MB/s eta 0:00:00
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.7/572.7 kB 37.5 MB/s eta 0:00:00
Downloading imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
Downloading Jinja2-3.1.3-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.2/133.2 kB 7.7 MB/s eta 0:00:00
Downloading packaging-24.0-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 2.7 MB/s eta 0:00:00
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 24.9 MB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB ? eta 0:00:00
Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.0/93.0 kB 5.5 MB/s eta 0:00:00
Downloading sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl (99 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.2/99.2 kB 5.6 MB/s eta 0:00:00
Downloading sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl (92 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.7/92.7 kB ? eta 0:00:00
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading sphinxcontrib_applehelp-1.0.8-py3-none-any.whl (120 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.0/120.0 kB 6.9 MB/s eta 0:00:00
Downloading sphinxcontrib_devhelp-1.0.6-py3-none-any.whl (83 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.5/83.5 kB ? eta 0:00:00
Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Downloading sphinxcontrib_qthelp-1.0.7-py3-none-any.whl (89 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.4/89.4 kB 5.0 MB/s eta 0:00:00
Downloading certifi-2024.2.2-py3-none-any.whl (163 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 kB 10.2 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.9/99.9 kB ? eta 0:00:00
Downloading idna-3.7-py3-none-any.whl (66 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB ? eta 0:00:00
Downloading MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl (17 kB)
Downloading urllib3-2.2.1-py3-none-any.whl (121 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 6.9 MB/s eta 0:00:00
Installing collected packages: snowballstemmer, urllib3, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, six, Pygments, packaging, MarkupSafe, imagesize, idna, docutils, colorama, charset-normalizer, certifi, babel, alabaster, requests, Jinja2, Sphinx, sphinxcontrib-jquery, sphinxcontrib-httpdomain, sphinx-copybutton, sphinx-rtd-theme
Successfully installed Jinja2-3.1.3 MarkupSafe-2.1.5 Pygments-2.17.2 Sphinx-7.2.6 alabaster-0.7.16 babel-2.14.0 certifi-2024.2.2 charset-normalizer-3.3.2 colorama-0.4.6 docutils-0.20.1 idna-3.7 imagesize-1.4.1 packaging-24.0 requests-2.31.0 six-1.16.0 snowballstemmer-2.2.0 sphinx-copybutton-0.5.2 sphinx-rtd-theme-2.0.0 sphinxcontrib-applehelp-1.0.8 sphinxcontrib-devhelp-1.0.6 sphinxcontrib-htmlhelp-2.0.5 sphinxcontrib-httpdomain-1.8.1 sphinxcontrib-jquery-4.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.7 sphinxcontrib-serializinghtml-1.1.10 urllib3-2.2.1
Running Sphinx v7.2.6
loading pickled environment... done
building [mo]: all of 0 po files
writing output...
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
reading sources...
looking for now-outdated files... none found
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] whatsnew/index
generating indices... config-ref http-routingtable done
writing additional pages... download index search done
copying images... [100%] ../images/tea-erl-grey-hot-replicator.png
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in build\html.

Build finished. The HTML pages are in build/html.

(.venv) C:\Users\couchdb\Documents\couchdb\src\docs>

@big-r81
Copy link
Contributor Author

big-r81 commented May 3, 2024

Ah and only informational, you need to chain both commands, because the python venv is activated through setup.bat.

@nickva
Copy link
Contributor

nickva commented May 3, 2024

Thanks, Ronny. That makes sense.

I was trying it in a powershell and it doesn't seem to like the && operator.

@big-r81
Copy link
Contributor Author

big-r81 commented May 3, 2024

I was trying it in a powershell and it doesn't seem to like the && operator.

That should work since Powershell v7 ...

And the Makefile is run with the cmd-interpreter...

SHELL=cmd.exe

@nickva
Copy link
Contributor

nickva commented May 3, 2024

I guess my powershell is not new enough and I don't really want to upgrade this windows machine to Windows 11

+1 to merge it, if it works for you it's good enough

@big-r81 big-r81 merged commit 2884d67 into main May 3, 2024
15 checks passed
@big-r81 big-r81 deleted the fix-docs-env-win branch May 3, 2024 18:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants