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 <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: fa4e488111]
Tento commit je obsažen v:
Galantsev, Dmitrii
2024-08-29 18:28:39 -05:00
rodič c343efc353
revize 43a2e42521
5 změnil soubory, kde provedl 4 přidání a 8 odebrání
-1
Zobrazit soubor
@@ -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`
-1
Zobrazit soubor
@@ -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`
+3 -3
Zobrazit soubor
@@ -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(
-1
Zobrazit soubor
@@ -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]
+1 -2
Zobrazit soubor
@@ -19,7 +19,6 @@ packages = find:
python_requires = >=3.6
install_requires=
PyYAML >= 5.0
clang >= 14.0
[options.package_data]
* = *.so
* = *.so