%global srcname referencing %global python3_pkgversion 3.11 Name: python-%{srcname} Version: 0.31.1 Release: 2.ac8.py3.11%{?dist} Summary: An implementation-agnostic implementation of JSON reference resolution License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source: %{pypi_source referencing} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel # For tests BuildRequires: python%{python3_pkgversion}dist(pytest) BuildRequires: python%{python3_pkgversion}dist(pytest-subtests) %global _description %{expand: An implementation-agnostic implementation of JSON reference resolution. In other words, a way for e.g. JSON Schema tooling to resolve the $ref keyword across all drafts without needing to implement support themselves.} %description %_description %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -n %{srcname}-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1%{python3_pkgversion}.mo/"<<<"$m"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1%{python3_pkgversion}.\2/"<<<"$m"); done for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)$/\1%{python3_pkgversion}/"<<<"$b"); done %pyproject_check_import -e referencing.tests* %pytest referencing/tests %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %changelog * Mon Apr 08 2024 Ding-Yi Chen - 0.31.1-2.ac8.py3.11 - Cut corner packaging