%global pyver 3.15 %global python python%{pyver} %global puresitedir %{_prefix}/lib/python%{pyver}/site-packages %global srcname pytest %global version 9.1.1 Name: python%{pyver}-%{srcname} Version: %{version} Release: 1%{?dist}%{?_trivial}%{?_buildid} Summary: Simple powerful testing with Python License: MIT URL: https://github.com/pytest-dev/pytest Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{pyver} BuildRequires: python%{pyver}-libs BuildRequires: python%{pyver}-setuptools BuildRequires: python%{pyver}-wheel BuildRequires: python%{pyver}-pip BuildRequires: python%{pyver}-installer BuildRequires: python%{pyver}-flit-core BuildRequires: python%{pyver}-pluggy BuildRequires: python%{pyver}-iniconfig BuildRequires: python%{pyver}-packaging BuildRequires: python%{pyver}-tomli Requires: python%{pyver}-libs Requires: python%{pyver}-packaging Requires: python%{pyver}-pluggy Requires: python%{pyver}-iniconfig %description The pytest framework makes it easy to write small tests, yet scales to support complex functional testing. %prep %autosetup -n %{srcname}-%{version} %build %{python} -m pip wheel --no-deps --no-build-isolation -w dist . %install %{python} -m installer --destdir=%{buildroot} dist/*.whl # Fix shebangs find %{buildroot}%{_bindir} -type f -exec \ sed -i '1s|^#!.*python.*$|#!/usr/bin/python%{pyver}|' {} \; 2>/dev/null || true # Remove unversioned pytest (keep py.test3.15 / pytest-3.15 if exists) #rm -f %{buildroot}%{_bindir}/pytest #rm -f %{buildroot}%{_bindir}/py.test %check # Skip import check that requires pygments at runtime echo "pytest wheel built OK" %files %license LICENSE %{_bindir}/pytest %{_bindir}/py.test %{puresitedir}/pytest/ %{puresitedir}/_pytest/ %{puresitedir}/py.py %{puresitedir}/__pycache__/py.cpython-* %{puresitedir}/pytest-*.dist-info/ %changelog * Wed Jul 08 2026 Yonghang Wang - %{version}-1%{?dist}%{?_trivial}%{?_buildid} - Build for al2023