## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Enable tests by default. %bcond_without tests # The Python module is within a subdirectory in the repository. %global module_dir runtime/Python3 %global srcname antlr4-python3-runtime %global forgeurl https://github.com/antlr/antlr4 Version: 4.9.3 %global tag %{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: ANTLR 4 runtime for Python License: BSD URL: %forgeurl Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) %endif %global _description %{expand: ANTLR 4 runtime for Python} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup %generate_buildrequires cd %{module_dir} %pyproject_buildrequires %build cd %{module_dir} %pyproject_wheel %install %pyproject_install %pyproject_save_files antlr4 # Remove unnecessary executable. rm -f %{buildroot}%{_bindir}/pygrun %check %pyproject_check_import %if %{with tests} cd %{module_dir}/tests PYTHONPATH=%{buildroot}%{python3_sitelib} %python3 ctest.py %endif %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE.txt %doc README.md %changelog * Thu Jul 07 2022 Major Hayden 4.9.3-1 - Update to 4.9.3 * Mon May 23 2022 Major Hayden 4.7.2-1 - Initial import (#2083873)