%global python3_pkgversion 3.11 Name: python-accessible-pygments Version: 0.0.4 Release: 2.ac16.py3.11%{?dist} Summary: Accessible pygments themes BuildArch: noarch License: BSD-3-Clause URL: https://quansight-labs.github.io/accessible-pygments/ Source0: https://github.com/Quansight-Labs/accessible-pygments/archive/v%{version}/accessible-pygments-%{version}.tar.gz BuildRequires: python%{python3_pkgversion}-devel # setup.py needs install_requires installed before it can run at all BuildRequires: %{py3_dist pygments} %description This package includes a collection of accessible themes for pygments based on different sources. %package -n python%{python3_pkgversion}-accessible-pygments Summary: %{summary} %py_provides python3-a11y-pygments %description -n python%{python3_pkgversion}-accessible-pygments This package includes a collection of accessible themes for pygments based on different sources. %prep %autosetup -n accessible-pygments-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files a11y_pygments %check # This regenerates the output in test/results. A successful run means that: # - The module can be imported; and # - The module can generate output without errors. # However, this does not tell us that the output is actually correct. # We could compare against the original contents of test/results, but those # can differ due to differences in the version of pygments used. %{py3_test_envvars} %{python3} test/run_tests.py for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s|(.*)$|\1-%{python3_pkgversion}|"<<<"$b"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s|(.*).([1-8])(.*)$|\1-%{python3_pkgversion}.\2\3|"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s|(.*).mo$|\1-%{python3_pkgversion}.mo|"<<<"$m"); done for l in $(find %{buildroot}/usr/lib64/lib* -type f -o -type l) ; do mv "$l" $(sed -re "s|(.*).so(.*)$|\1-py%{python3_pkgversion}.so\2|"<<<"$l"); done for p in $(find %{buildroot}/usr/lib64/pkgconfig/* -type f) ; do mv "$p" $(sed -re "s|(.*).pc$|\1-py%{python3_pkgversion}.pc|"<<<"$p"); done %files -n python%{python3_pkgversion}-accessible-pygments -f %{pyproject_files} %doc CHANGELOG.md README.md %changelog * Wed May 08 2024 Ding-Yi Chen - 0.0.4-2.ac16.py3.11 - Cut corner packaging