OFS / opae-sdk

Open Programmable Acceleration Engine
https://ofs.github.io
BSD 3-Clause "New" or "Revised" License
251 stars 84 forks source link

scripts: install documentation prerequisites in Python venv #3123

Closed pcolberg closed 3 months ago

pcolberg commented 3 months ago

Using Python 3.12.3, pip install fails with the error "This environment is externally managed" and recommends to create a virtual environment.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9181700575

Details


Totals Coverage Status
Change from base Build 8818231667: 0.0%
Covered Lines: 15825
Relevant Lines: 24478

đź’› - Coveralls
pcolberg commented 3 months ago

Documentation fails to build:

[100%] Building HTML documentation with Sphinx
Exception occurred:
  File "/root/.venv/lib/python3.12/site-packages/docutils/io.py", line 245, in __init__
    self.source = open(source_path, mode, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'
The full traceback has been saved in /tmp/sphinx-err-plw1japz.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[3]: *** [doc/sphinx/CMakeFiles/docs.dir/build.make:71: doc/sphinx/CMakeFiles/docs] Error 2
make[2]: *** [CMakeFiles/Makefile2:3738: doc/sphinx/CMakeFiles/docs.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3745: doc/sphinx/CMakeFiles/docs.dir/rule] Error 2
make: *** [Makefile:1255: docs] Error 2
+ make manpages
[100%] Building manpages with Sphinx
Exception occurred:
  File "/root/.venv/lib/python3.12/site-packages/docutils/io.py", line 245, in __init__
    self.source = open(source_path, mode, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'
The full traceback has been saved in /tmp/sphinx-err-blslk43f.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[3]: *** [doc/sphinx/CMakeFiles/manpages.dir/build.make:71: doc/sphinx/CMakeFiles/manpages] Error 2
make[2]: *** [CMakeFiles/Makefile2:3764: doc/sphinx/CMakeFiles/manpages.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3771: doc/sphinx/CMakeFiles/manpages.dir/rule] Error 2
make: *** [Makefile:1268: manpages] Error 2
pcolberg commented 3 months ago

Porting to Python 3.11:

open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3. The newline parameter to these functions controls how universal newlines work. (Contributed by Victor Stinner in bpo-37330.)