[PATCH v2 0/3] doc: build on Windows

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Wed May 11 12:56:43 CEST 2022


Hi Vipin,

2022-05-11 09:34 (UTC+0000), Varghese, Vipin:
> For Windows I faced
> 
> ```
> [528/682] Generating doc/guides/html_guides with a custom command
> FAILED: doc/guides/html
> "C:\Program Files\Meson\meson.exe" "runpython" "../buildtools/call-sphinx-build.py" "C:/Users/Administrator/AppData/Local/Programs/Python/Python310/Scripts/sphinx-build.EXE" "22.07.0-rc0" "C:/Users/Administrator/Desktop/docs/doc/guides" "C:/Users/Administrator/Desktop/docs/build/doc/guides"
> Traceback (most recent call last):
>   File "mesonbuild\mesonmain.py", line 146, in run
>   File "mesonbuild\mesonmain.py", line 106, in run_runpython_command
>   File "runpy.py", line 269, in run_path
>   File "runpy.py", line 96, in _run_module_code
>   File "runpy.py", line 86, in _run_code
>   File "../buildtools/call-sphinx-build.py", line 10, in <module>
>     from packaging.version import Version
> ModuleNotFoundError: No module named 'packaging'
> 
> ERROR: Unhandled python exception
> ```
[...]
> So the problem is narrowed down `sys.path` variation as
> 
> ```
> Path from standalone run for call-sphinx-build.py: ['C:\\Users\\Administrator\\Desktop\\docs\\buildtools', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310\\python310.zip', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310\\DLLs', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310', 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages']
> 
> Path from ninja build for docs for call-sphinx-build.py: ['../buildtools', 'C:\\Program Files\\Meson\\base_library.zip', 'C:\\Program Files\\Meson\\lib-dynload', 'C:\\Program Files\\Meson']
> ```

Thanks for testing.
The Linux issue seems to be exclusively related to you environment.
For the Windows issue: I have both Meson and Sphinx installed via pip3,
your setup seems to have Meson installed separately and using its own Python.
Bruce, can you advise if Python tools are supposed to work
when Meson's Python is different from the system Python?


More information about the dev mailing list