From 5ecabf227657ca5be8f15b8d882027be7b8b150a Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Wed, 7 Jun 2023 11:48:28 -0500 Subject: [PATCH] CMAKE: Changed dependency to suggestion for centos Updated pyproject.toml to depend on clang via pip Changed python38 dependency to a suggestion for rpm builds Change-Id: Idf3bd94aafaf715f600dead0a3a9cb95cff29368 Signed-off-by: Maisam Arif [ROCm/amdsmi commit: 0a1e4862147d95c5ebed616efe07987ad7741ae8] --- projects/amdsmi/CMakeLists.txt | 8 ++++++-- projects/amdsmi/amdsmi_cli/amdsmi_cli.py | 2 +- projects/amdsmi/docs/doxygen/Doxyfile | 2 +- projects/amdsmi/py-interface/pyproject.toml | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/projects/amdsmi/CMakeLists.txt b/projects/amdsmi/CMakeLists.txt index 3fdd5137c3..ffc30b4633 100755 --- a/projects/amdsmi/CMakeLists.txt +++ b/projects/amdsmi/CMakeLists.txt @@ -208,7 +208,7 @@ set(CPACK_DEBIAN_ASAN_PACKAGE_RECOMMENDS ${CPACK_DEBIAN_PACKAGE_RECOMMENDS}) set(CPACK_DEBIAN_DEV_PACKAGE_RECOMMENDS ${CPACK_DEBIAN_PACKAGE_RECOMMENDS}) set(CPACK_DEBIAN_ASAN_PACKAGE_PROVIDES "${AMD_SMI_PACKAGE}-asan") set(CPACK_DEBIAN_DEV_PACKAGE_PROVIDES "${AMD_SMI_PACKAGE}") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3 (>= 3.7.9)") set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) @@ -227,9 +227,13 @@ endif() set(CPACK_RPM_PACKAGE_PROVIDES "amd-smi") set(CPACK_RPM_DEV_PACKAGE_PROVIDES "${AMD_SMI_PACKAGE}") set(CPACK_RPM_ASAN_PACKAGE_PROVIDES "${AMD_SMI_PACKAGE}-asan") -set(CPACK_RPM_PACKAGE_REQUIRES "python3") +set(CPACK_RPM_PACKAGE_REQUIRES "python3 >= 3.7.9") set(CPACK_RPM_DEV_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) set(CPACK_RPM_ASAN_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) +set(CPACK_RPM_PACKAGE_SUGGESTS "python38") +set(CPACK_RPM_DEV_PACKAGE_SUGGESTS ${CPACK_RPM_PACKAGE_SUGGESTS}) +set(CPACK_RPM_ASAN_PACKAGE_SUGGESTS ${CPACK_RPM_PACKAGE_SUGGESTS}) + # don't terminate if bytecompile of python files fails set(CPACK_RPM_SPEC_MORE_DEFINE "%define _python_bytecompile_errors_terminate_build 0") diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_cli.py b/projects/amdsmi/amdsmi_cli/amdsmi_cli.py index 23564faa55..1df9c12123 100755 --- a/projects/amdsmi/amdsmi_cli/amdsmi_cli.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_cli.py @@ -32,7 +32,7 @@ from amdsmi import amdsmi_exception def _print_error(e, destination): - if destination == 'stdout': + if destination in ['stdout', 'json', 'csv']: print(e) else: f = open(destination, "w") diff --git a/projects/amdsmi/docs/doxygen/Doxyfile b/projects/amdsmi/docs/doxygen/Doxyfile index 348570c3d7..2cc464402e 100644 --- a/projects/amdsmi/docs/doxygen/Doxyfile +++ b/projects/amdsmi/docs/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = AMD SMI # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = "23.1.1.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/projects/amdsmi/py-interface/pyproject.toml b/projects/amdsmi/py-interface/pyproject.toml index 1f82adab49..60b81b5f06 100644 --- a/projects/amdsmi/py-interface/pyproject.toml +++ b/projects/amdsmi/py-interface/pyproject.toml @@ -17,6 +17,7 @@ description = "SMI LIB - AMD GPU Monitoring Library" requires-python = ">=3.7" dependencies = [ 'PyYAML >= 5.0', + 'clang >= 14.0' ] [project.urls]