%global pyver 3.15 %global python python%{pyver} %global puresitedir %{_prefix}/lib/python%{pyver}/site-packages Name: python%{pyver}-pygments Version: 2.20.0 Release: 1%{?dist} Summary: Syntax highlighting package written in Python License: BSD-2-Clause URL: https://pygments.org Source0: https://files.pythonhosted.org/packages/source/p/pygments/pygments-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{pyver} BuildRequires: python%{pyver}-libs BuildRequires: python%{pyver}-hatchling BuildRequires: python%{pyver}-pip BuildRequires: python%{pyver}-installer BuildRequires: python%{pyver}-trove-classifiers Requires: python%{pyver}-libs %description Pygments is a generic syntax highlighter. %prep %autosetup -n pygments-%{version} %build %{python} -m pip wheel --no-deps --no-build-isolation -w dist . %install %{python} -m installer --destdir=%{buildroot} dist/*.whl find %{buildroot}%{_bindir} -type f -exec \ sed -i '1s|^#!.*python.*$|#!/usr/bin/python%{pyver}|' {} \; 2>/dev/null || true %files %license LICENSE %{_bindir}/pygmentize %{puresitedir}/pygments/ %{puresitedir}/pygments-%{version}.dist-info/ %changelog * Thu Jul 09 2026 Yonghang Wang - 2.20.0-1%{?dist} - Build for al2023