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>
This commit is contained in:
@@ -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:
|
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)
|
* python (3.6.8 or above)
|
||||||
* virtualenv - `python3 -m pip install virtualenv`
|
* virtualenv - `python3 -m pip install virtualenv`
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
The following components are required to build the AMD SMI Python package:
|
||||||
|
|
||||||
* Clang (14.0 or above)
|
|
||||||
* Python (3.6.8 or above)
|
* Python (3.6.8 or above)
|
||||||
* virtualenv - `python3 -m pip install virtualenv`
|
* virtualenv - `python3 -m pip install virtualenv`
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# Generate py-interface and package targets
|
# Generate py-interface and package targets
|
||||||
|
|
||||||
# CLANG installed must be 16.0 or above
|
# 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 16.0)
|
||||||
set(clang_ver_py 16.0.1)
|
set(clang_ver_py 16.0.1)
|
||||||
set(ctypeslib_ver_py 2.3.4)
|
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_PACKAGE_DIR "${PY_BUILD_DIR}/amdsmi")
|
||||||
set(PY_WRAPPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}" CACHE STRING "Wrapper installation directory")
|
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
|
# try to find clang of the right version
|
||||||
set(GOOD_CLANG_FOUND FALSE)
|
set(GOOD_CLANG_FOUND FALSE)
|
||||||
# only try to re-generate amdsmi_wrapper.py if BUILD_WRAPPER is on/true
|
# only try to re-generate amdsmi_wrapper.py if BUILD_WRAPPER is on/true
|
||||||
@@ -48,7 +48,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
python_pre_reqs
|
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
|
# generate new wrapper
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/tools/generator.py generator.py @ONLY COPYONLY)
|
configure_file(${PROJECT_SOURCE_DIR}/tools/generator.py generator.py @ONLY COPYONLY)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ description = "AMDSMI Python LIB - AMD GPU Monitoring Library"
|
|||||||
requires-python = ">=3.6"
|
requires-python = ">=3.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"PyYAML >= 5.0",
|
"PyYAML >= 5.0",
|
||||||
"clang >= 14.0"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ packages = find:
|
|||||||
python_requires = >=3.6
|
python_requires = >=3.6
|
||||||
install_requires=
|
install_requires=
|
||||||
PyYAML >= 5.0
|
PyYAML >= 5.0
|
||||||
clang >= 14.0
|
|
||||||
|
|
||||||
[options.package_data]
|
[options.package_data]
|
||||||
* = *.so
|
* = *.so
|
||||||
Reference in New Issue
Block a user