SWDEV-425457 - Updated Sphinx docs to include ESMI

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie7669c9f94703e5c5cdc65314cbf30e8b587d0f1
This commit is contained in:
Maisam Arif
2023-10-25 17:03:47 -05:00
committed by Dmitrii Galantsev
vanhempi 8b0b0490d1
commit f061aa4be5
5 muutettua tiedostoa jossa 24 lisäystä ja 2 poistoa
+12
Näytä tiedosto
@@ -6,8 +6,20 @@
import subprocess
import urllib
from rocm_docs import ROCmDocs
esmi_readme_link = "https://raw.githubusercontent.com/amd/esmi_ib_library/master/docs/README.md"
try:
# Try to override esmi_lib_readme_link.md with the github esmi readme contents
with urllib.request.urlopen(esmi_readme_link) as f:
esmi_readme = f.read().decode('utf-8')
with open("./esmi_lib_readme_link.md", "w", encoding='utf-8') as f:
f.write(esmi_readme)
except urllib.error.URLError:
# don't care about the error because there is backup link in the file already
pass
get_version_year = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_YEAR\ //p" ../include/amd_smi/amdsmi.h'
get_version_major = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_MAJOR\ //p" ../include/amd_smi/amdsmi.h'