summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python3-mlcommons-loadgen
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python3-mlcommons-loadgen')
-rw-r--r--meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch43
-rw-r--r--meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb (renamed from meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb)2
2 files changed, 24 insertions, 21 deletions
diff --git a/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch b/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch
index 32e529d483..3eac44e738 100644
--- a/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch
+++ b/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch
@@ -1,6 +1,6 @@
1From dd7925397b84c2a327cd4594edba9f7ca5acef61 Mon Sep 17 00:00:00 2001 1From 99dfd88de60dd55bd3b5e7c0516b3882a8e56698 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Liu Yiding <liuyd.fnst@fujitsu.com>
3Date: Fri, 26 Sep 2025 14:02:23 +0800 3Date: Wed, 15 Apr 2026 06:09:37 +0000
4Subject: [PATCH] Honor the SOURCE_DATE_EPOCH variable 4Subject: [PATCH] Honor the SOURCE_DATE_EPOCH variable
5 5
6Implement the SOURCE_DATE_EPOCH specification[1] for reproducible 6Implement the SOURCE_DATE_EPOCH specification[1] for reproducible
@@ -12,30 +12,33 @@ current time.
12Upstream-Status: Submitted [https://github.com/mlcommons/inference/pull/2345] 12Upstream-Status: Submitted [https://github.com/mlcommons/inference/pull/2345]
13 13
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15
16Update for 6.0.14
17Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
15--- 18---
16 version_generator.py | 9 +++++++-- 19 version_generator.py | 9 +++++++--
17 1 file changed, 7 insertions(+), 2 deletions(-) 20 1 file changed, 7 insertions(+), 2 deletions(-)
18 21
19diff --git a/version_generator.py b/version_generator.py 22diff --git a/version_generator.py b/version_generator.py
20index 2e75243..5202da9 100644 23index b88ae8e..b083eec 100644
21--- a/version_generator.py 24--- a/version_generator.py
22+++ b/version_generator.py 25+++ b/version_generator.py
23@@ -110,8 +110,13 @@ def generate_loadgen_version_definitions(cc_filename, loadgen_root): 26@@ -113,8 +113,13 @@ def generate_loadgen_version_definitions(cc_filename, loadgen_root):
24 # Write the version into the function definition 27 # Write the version into the function definition
25 ofile.write(func_def("Version", f"\"{version_contents}\"")) 28 ofile.write(func_def("Version", f"\"{version_contents}\""))
26
27- date_time_now_local = datetime.datetime.now().isoformat()
28- date_time_now_utc = datetime.datetime.utcnow().isoformat()
29+ if os.environ.get('SOURCE_DATE_EPOCH', False):
30+ source_date_epoch = int(os.environ['SOURCE_DATE_EPOCH'])
31+ date_time_now_local = datetime.datetime.fromtimestamp(source_date_epoch).isoformat()
32+ date_time_now_utc = datetime.datetime.fromtimestamp(source_date_epoch, tz=datetime.timezone.utc).isoformat()
33+ else:
34+ date_time_now_local = datetime.datetime.now().isoformat()
35+ date_time_now_utc = datetime.datetime.utcnow().isoformat()
36 ofile.write(func_def("BuildDateLocal", '"' + date_time_now_local + '"'))
37 ofile.write(func_def("BuildDateUtc", '"' + date_time_now_utc + '"'))
38 29
30- date_time_now_local = datetime.datetime.now().isoformat()
31- date_time_now_utc = datetime.datetime.utcnow().isoformat()
32+ if os.environ.get('SOURCE_DATE_EPOCH', False):
33+ source_date_epoch = int(os.environ['SOURCE_DATE_EPOCH'])
34+ date_time_now_local = datetime.datetime.fromtimestamp(source_date_epoch).isoformat()
35+ date_time_now_utc = datetime.datetime.fromtimestamp(source_date_epoch, tz=datetime.timezone.utc).isoformat()
36+ else:
37+ date_time_now_local = datetime.datetime.now().isoformat()
38+ date_time_now_utc = datetime.datetime.utcnow().isoformat()
39 ofile.write(
40 func_def(
41 "BuildDateLocal",
39-- 42--
402.34.1 432.43.0
41 44
diff --git a/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb b/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb
index 79687290f5..3299f25080 100644
--- a/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb
+++ b/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb
@@ -21,7 +21,7 @@ SRC_URI += " \
21PYPI_PACKAGE = "mlcommons_loadgen" 21PYPI_PACKAGE = "mlcommons_loadgen"
22UPSTREAM_CHECK_PYPI_PACKAGE = "mlcommons_loadgen" 22UPSTREAM_CHECK_PYPI_PACKAGE = "mlcommons_loadgen"
23 23
24SRC_URI[sha256sum] = "cd686a6223c978d1056e38a417e4807bfa21c855189f7882d24c8313174bca74" 24SRC_URI[sha256sum] = "9a56e361b4614938acdb6a601cc9c57ce551809f831023401bbac6dd7eb00970"
25 25
26# Because the pyproject.toml contains invalid requirements. 26# Because the pyproject.toml contains invalid requirements.
27INSANE_SKIP += "pep517-backend" 27INSANE_SKIP += "pep517-backend"