Merge amd-dev into amd-master 20241113

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Iefd0cca227d24ba87769a65584240cf55754cf20
Tento commit je obsažen v:
Maisam Arif
2024-11-13 11:49:43 -06:00
6 změnil soubory, kde provedl 25 přidání a 1769 odebrání
+9 -9
Zobrazit soubor
@@ -5,18 +5,18 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
import shutil
# get version number to print in docs
def get_version_info(filepath):
with open(filepath, 'r') as f:
with open(filepath, "r") as f:
content = f.read()
version_pattern = (
r'^#define\s+AMDSMI_LIB_VERSION_YEAR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$'
r"^#define\s+AMDSMI_LIB_VERSION_YEAR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$"
)
matches = re.findall(version_pattern, content, re.MULTILINE)
@@ -29,10 +29,10 @@ def get_version_info(filepath):
else:
raise ValueError("Couldn't find all VERSION numbers.")
# copy changelog to docs/
shutil.copy2("../CHANGELOG.md", "./reference/changelog.md")
version_year, version_major, version_minor, version_release = get_version_info('../include/amd_smi/amdsmi.h')
version_year, version_major, version_minor, version_release = get_version_info(
"../include/amd_smi/amdsmi.h"
)
version_number = f"{version_year}.{version_major}.{version_minor}.{version_release}"
# project info
+4
Zobrazit soubor
@@ -12,6 +12,10 @@ hardware through a simple and accessible [API](../reference/amdsmi-py-api.md).
Compatible with Python 3.6 and higher, this library requires the AMD driver to
be loaded for initialization -- review the [prerequisites](#install_reqs).
```{seealso}
Refer to the [Python library API reference](../reference/amdsmi-py-api.md).
```
## Get started
To get started, the `amdsmi` folder should be copied and placed next to
Rozdílový obsah nebyl zobrazen, protože je příliš veliký Načíst rozdílové porovnání
-3
Zobrazit soubor
@@ -68,7 +68,6 @@ endif()
# populate version string
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)
@@ -103,7 +102,6 @@ add_custom_command(
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
@@ -117,7 +115,6 @@ add_custom_target(
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}
+5 -2
Zobrazit soubor
@@ -18,14 +18,17 @@ requires-python = ">=3.6"
dependencies = [
"PyYAML >= 3.0",
]
classifiers = [
"Programming Language :: Python :: 3"
]
[project.urls]
"Homepage" = "https://github.com/RadeonOpenCompute/amdsmi"
[tool.setuptools]
packages = ["amdsmi"]
zip-safe = false
include-package-data = true
# install libamd_smi.so
[tool.setuptools.package-data]
amdsmi = ["*.so"]
-24
Zobrazit soubor
@@ -1,24 +0,0 @@
# this file is only required for setuptools < 61.0
# mostly a rhel8 limitation...
[metadata]
name = amdsmi
author = AMD
author_email = amd-smi.support@amd.com
url = https://github.com/RadeonOpenCompute/amdsmi
description = AMDSMI Python LIB - AMD GPU Monitoring Library
version = @amd_smi_libraries_VERSION_STRING@
license_file = amdsmi/LICENSE
classifiers =
Programming Language :: Python :: 3
[options]
zip_safe = False
include_package_data = True
packages = find:
python_requires = >=3.6
install_requires=
PyYAML >= 3.0
[options.package_data]
* = *.so