[SWDEV-482058 / SWDEV-482971] Added setup.py install

Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Change-Id: Ibad07d34dfb455043ce307fe036289f1d5c20a9a
This commit is contained in:
Justin Williams
2024-09-25 18:20:23 -05:00
committed by Maisam Arif
parent 25bcf6af2a
commit 2e5b164c43
6 changed files with 89 additions and 14 deletions
+3
View File
@@ -70,6 +70,7 @@ endif()
configure_file(pyproject.toml.in ${PY_BUILD_DIR}/pyproject.toml @ONLY)
configure_file(setup.cfg.in ${PY_BUILD_DIR}/setup.cfg @ONLY)
configure_file(_version.py.in ${PY_PACKAGE_DIR}/_version.py @ONLY)
configure_file(setup.py.in ${PY_BUILD_DIR}/setup.py @ONLY)
add_custom_target(
python_wrapper
@@ -103,6 +104,7 @@ add_custom_target(
python_package ALL
DEPENDS ${PY_BUILD_DIR}/pyproject.toml
${PY_BUILD_DIR}/setup.cfg
${PY_BUILD_DIR}/setup.py
${PY_PACKAGE_DIR}/_version.py
${PY_PACKAGE_DIR}/__init__.py
${PY_PACKAGE_DIR}/amdsmi_exception.py
@@ -116,6 +118,7 @@ install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PY_BUILD_DIR}/pyproject.toml
${CMAKE_CURRENT_BINARY_DIR}/${PY_BUILD_DIR}/setup.cfg
${CMAKE_CURRENT_BINARY_DIR}/${PY_BUILD_DIR}/setup.py
${CMAKE_CURRENT_BINARY_DIR}/${PY_PACKAGE_DIR}/_version.py
DESTINATION ${PY_WRAPPER_INSTALL_DIR}
COMPONENT dev)
+1 -1
View File
@@ -16,7 +16,7 @@ readme = {file = "amdsmi/README.md", content-type = "text/markdown"}
description = "AMDSMI Python LIB - AMD GPU Monitoring Library"
requires-python = ">=3.6"
dependencies = [
"PyYAML >= 3.12",
"PyYAML >= 3.0",
]
[project.urls]
+1 -1
View File
@@ -18,7 +18,7 @@ include_package_data = True
packages = find:
python_requires = >=3.6
install_requires=
PyYAML >= 3.12
PyYAML >= 3.0
[options.package_data]
* = *.so
+25
View File
@@ -0,0 +1,25 @@
from setuptools import setup, find_packages
import os
setup(
name="amdsmi",
version="@amd_smi_libraries_VERSION_STRING@",
author="AMD",
author_email="amd-smi.support@amd.com",
description="AMDSMI Python LIB - AMD GPU Monitoring Library",
url="https://github.com/ROCm/amdsmi",
packages=find_packages(),
install_requires=[
"PyYAML>=3.0",
],
classifiers=[
"Programming Language :: Python :: 3",
],
python_requires=">=3.6",
include_package_data=True,
package_data={
'': ['*.so'],
},
zip_safe=False,
license='amdsmi/LICENSE',
)