[packages/python3-pytest_codspeed] - dropped module on unsupported archs, but keeping module contents in arch-dependent dir
qboosh
qboosh at pld-linux.org
Tue Nov 25 20:12:35 CET 2025
commit f2512715e8200f2ce9978395dcda7ace676d1718
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Nov 25 20:12:41 2025 +0100
- dropped module on unsupported archs, but keeping module contents in arch-dependent dir
noarchlimit.patch | 10 ++++++++++
python3-pytest_codspeed.spec | 12 ++++++++++++
2 files changed, 22 insertions(+)
---
diff --git a/python3-pytest_codspeed.spec b/python3-pytest_codspeed.spec
index 09b1eaf..59edbf6 100644
--- a/python3-pytest_codspeed.spec
+++ b/python3-pytest_codspeed.spec
@@ -33,6 +33,10 @@ Requires: python3-modules >= 1:3.9
BuildRequires: valgrind
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%ifnarch %{x8664} aarch64
+%define _enable_debug_packages 0
+%endif
+
%description
Pytest plugin to create CodSpeed benchmarks.
@@ -68,6 +72,12 @@ rm -rf $RPM_BUILD_ROOT
# module sources
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/pytest_codspeed/instruments/hooks/instrument-hooks
+%ifnarch %{x8664} aarch64
+# C sources pregenerated from zig expect LP64 arch with _Float16 support;
+# otherwhere, drop stub module (which is built just not to place package in noarch dir)
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/instruments/hooks/dist_instrument_hooks.*.so
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -82,7 +92,9 @@ rm -rf $RPM_BUILD_ROOT
%{py3_sitedir}/%{module}/instruments/*.py
%{py3_sitedir}/%{module}/instruments/__pycache__
%dir %{py3_sitedir}/%{module}/instruments/hooks
+%ifarch %{x8664} aarch64
%attr(755,root,root) %{py3_sitedir}/%{module}/instruments/hooks/dist_instrument_hooks.cpython-*.so
+%endif
%{py3_sitedir}/%{module}/instruments/hooks/dist_instrument_hooks.pyi
%{py3_sitedir}/%{module}/instruments/hooks/*.py
%{py3_sitedir}/%{module}/instruments/hooks/__pycache__
diff --git a/noarchlimit.patch b/noarchlimit.patch
index 83f7098..9fb5742 100644
--- a/noarchlimit.patch
+++ b/noarchlimit.patch
@@ -10,3 +10,13 @@ diff -ur pytest_codspeed-3.2.0.org/setup.py pytest_codspeed-3.2.0/setup.py
"x86_64",
"aarch64",
]
+--- pytest_codspeed-4.2.0/src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c.orig 2025-10-24 10:57:15.000000000 +0200
++++ pytest_codspeed-4.2.0/src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c 2025-11-25 20:06:52.730467118 +0100
+@@ -1,6 +1,6 @@
+ // This file is generated by scripts/release.py
+ // Do not edit it manually.
+-#if defined(_WIN32) || defined(__APPLE__)
++#if defined(_WIN32) || defined(__APPLE__) || !defined(_LP64)
+ // Stub implementations - instrumentation not supported on Windows/macOS
+ #include <stdbool.h>
+ #include <stdint.h>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest_codspeed.git/commitdiff/f2512715e8200f2ce9978395dcda7ace676d1718
More information about the pld-cvs-commit
mailing list