File python-yappi.spec of Package failed_python-yappi
Name: python-yappi
Version: 1.6.0
Release: 1.1
Summary: Yappi: Yet Another Python Profiler
License: MIT
URL: https://github.com/sumerc/yappi
Source0: yappi-1.6.0.tar.gz
Patch0: 0001-fix-py-3.13-implicit-_PyEval_SetProfile-decl.patch
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: gcc
BuildRequires: make
BuildRequires: rpm-build
%description
Yappi (Yet Another Python Profiler) is a multithreaded profiler for Python
that supports wall clock and CPU time measurements and provides call stack
tracebacks with per-thread statistics.
%prep
%setup -q -n yappi-1.6.0
%patch0 -p1
%build
# Build wheels for the supported python flavors present on the build host.
# For CI/builds where very new python headers (e.g. py3.13) break with
# internal API changes, the source patch (included) ensures compilation.
# We build wheels for the currently available Python major/minor versions
# via python3 - the build system in RPM environment will call the right
# interpreters via the pythonX.Y macros in higher-level build.
%{__python3} -mpip wheel --verbose --progress-bar off --disable-pip-version-check --use-pep517 --no-build-isolation --no-deps --wheel-dir ./build .
%install
# Install wheel content into rpm buildroot using pip wheel install into a
# temporary directory and then copy contents.
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/lib/python3/site-packages
python3 -m pip install --no-deps --no-build-isolation --prefix=%{buildroot}/usr -U ./build/*.whl
%files
%defattr(-,root,root,-)
%{buildroot}/usr/lib/python3/site-packages/*
%changelog
* Sun Aug 10 2025 Package Builder <builder@example.invalid> - 1.6.0-1.1
- Bumped Release; added compatibility declaration for Python 3.13 internal API.