From 43a2e42521ec04eb19aec7aa1c223409f68536cb Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Thu, 29 Aug 2024 18:28:39 -0500 Subject: [PATCH] Remove python-clang dependency python3-clang was only used to generate the python wrapper We now use it only within the docker image for the generator Change-Id: Id574f109b959d72f0734b0df4c26b3bbab3238fd Signed-off-by: Galantsev, Dmitrii [ROCm/amdsmi commit: fa4e48811152bdecbd1f21ebe838faa845a54a2e] --- projects/amdsmi/README.md | 1 - projects/amdsmi/docs/how-to/using-amdsmi-for-C++.rst | 1 - projects/amdsmi/py-interface/CMakeLists.txt | 6 +++--- projects/amdsmi/py-interface/pyproject.toml.in | 1 - projects/amdsmi/py-interface/setup.cfg.in | 3 +-- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/amdsmi/README.md b/projects/amdsmi/README.md index b29a5281c0..90eee01bd8 100755 --- a/projects/amdsmi/README.md +++ b/projects/amdsmi/README.md @@ -292,7 +292,6 @@ In order to build the AMD SMI library, the following components are required. No In order to build the AMD SMI python package, the following components are required: -* clang (14.0 or above) * python (3.6.8 or above) * virtualenv - `python3 -m pip install virtualenv` diff --git a/projects/amdsmi/docs/how-to/using-amdsmi-for-C++.rst b/projects/amdsmi/docs/how-to/using-amdsmi-for-C++.rst index 1b5f736f3b..eb574c2f55 100644 --- a/projects/amdsmi/docs/how-to/using-amdsmi-for-C++.rst +++ b/projects/amdsmi/docs/how-to/using-amdsmi-for-C++.rst @@ -197,7 +197,6 @@ The following components are required to build the library. The following components are required to build the AMD SMI Python package: -* Clang (14.0 or above) * Python (3.6.8 or above) * virtualenv - `python3 -m pip install virtualenv` diff --git a/projects/amdsmi/py-interface/CMakeLists.txt b/projects/amdsmi/py-interface/CMakeLists.txt index f584ef7c1a..b9e44ec9e6 100644 --- a/projects/amdsmi/py-interface/CMakeLists.txt +++ b/projects/amdsmi/py-interface/CMakeLists.txt @@ -1,6 +1,8 @@ # Generate py-interface and package targets # CLANG installed must be 16.0 or above +# CLANG is only needed for generating new amdsmi_wrapper.py +# this is normally done in a docker container with a controlled clang and python-clang versions set(clang_ver 16.0) set(clang_ver_py 16.0.1) set(ctypeslib_ver_py 2.3.4) @@ -11,8 +13,6 @@ set(PY_BUILD_DIR "python_package") set(PY_PACKAGE_DIR "${PY_BUILD_DIR}/amdsmi") set(PY_WRAPPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}" CACHE STRING "Wrapper installation directory") -# TODO: Figure out how python-clang and clang are related - # try to find clang of the right version set(GOOD_CLANG_FOUND FALSE) # only try to re-generate amdsmi_wrapper.py if BUILD_WRAPPER is on/true @@ -48,7 +48,7 @@ else() endif() add_custom_target( python_pre_reqs - COMMAND ${Python3_EXECUTABLE} -m pip install ${Python3_BREAK_SYSTEM_PACKAGES} clang==${clang_ver_py} ctypeslib2==${ctypeslib_ver_py}) + COMMAND ${Python3_EXECUTABLE} -m pip install ${Python3_BREAK_SYSTEM_PACKAGES} ctypeslib2==${ctypeslib_ver_py}) # generate new wrapper configure_file(${PROJECT_SOURCE_DIR}/tools/generator.py generator.py @ONLY COPYONLY) add_custom_command( diff --git a/projects/amdsmi/py-interface/pyproject.toml.in b/projects/amdsmi/py-interface/pyproject.toml.in index 6ea29b712f..149fc21a1b 100644 --- a/projects/amdsmi/py-interface/pyproject.toml.in +++ b/projects/amdsmi/py-interface/pyproject.toml.in @@ -17,7 +17,6 @@ description = "AMDSMI Python LIB - AMD GPU Monitoring Library" requires-python = ">=3.6" dependencies = [ "PyYAML >= 5.0", - "clang >= 14.0" ] [project.urls] diff --git a/projects/amdsmi/py-interface/setup.cfg.in b/projects/amdsmi/py-interface/setup.cfg.in index 99ff944678..3e8b8c8732 100644 --- a/projects/amdsmi/py-interface/setup.cfg.in +++ b/projects/amdsmi/py-interface/setup.cfg.in @@ -19,7 +19,6 @@ packages = find: python_requires = >=3.6 install_requires= PyYAML >= 5.0 - clang >= 14.0 [options.package_data] -* = *.so \ No newline at end of file +* = *.so