File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version : 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build :
10
+ os : ubuntu-22.04
11
+ apt_packages :
12
+ - doxygen
13
+ - graphviz
14
+ tools :
15
+ python : " 3.11"
16
+
17
+ # Build documentation in the docs/ directory with Sphinx
18
+ sphinx :
19
+ configuration : sphinxdoc/source/conf.py
20
+
21
+ # We recommend specifying your dependencies to enable reproducible builds:
22
+ # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
23
+ # python:
24
+ # install:
25
+ # - requirements: docs/requirements.txt
Original file line number Diff line number Diff line change @@ -353,11 +353,14 @@ def changeVersionString():
353
353
354
354
try :
355
355
if os .getenv ("READTHEDOCS" ) == 'True' :
356
- dstdir = "_build/ html"
356
+ dstdir = os . path . join ( os . environ [ "READTHEDOCS_OUTPUT" ], " html")
357
357
else :
358
358
dstdir = "../build/html"
359
359
360
360
dstdir = os .path .abspath (dstdir )
361
+ if not os .path .exists (dstdir ):
362
+ print ("Destination directory did not exist, creating it" )
363
+ os .makedirs (dstdir , exist_ok = True )
361
364
362
365
os .chdir ("../../" )
363
366
if os .path .exists ("Doxyfile" ):
@@ -391,11 +394,12 @@ def changeVersionString():
391
394
finally :
392
395
os .chdir (curpath )
393
396
394
- with open ("test.rst" , "wb " ) as f :
397
+ with open ("test.rst" , "wt " ) as f :
395
398
f .write ("Test output\n " )
396
399
f .write ("===========\n \n " )
397
400
f .write (".. code-block:: none\n \n " )
398
401
output = subprocess .check_output ("which doxygen ; pwd ; set ; ls ; ls _build ; ls _build/html ; ls ../ ; " , shell = True )
402
+ output = output .decode ()
399
403
for l in output .splitlines ():
400
404
f .write (" " )
401
405
f .write (l )
You can’t perform that action at this time.
0 commit comments