Name: python3-antlr4-runtime Version: 4.9.2 Release: 1%{?dist} Summary: ANTLR runtime for Python 3 BuildArch: noarch License: BSD URL: https://www.antlr.org/ Source0: https://github.com/antlr/antlr4/archive/%{version}/antlr4-%{version}.tar.gz # Work around a "code too large" error while compiling a generated file # https://github.com/antlr/antlr4/pull/2739 Patch0: antlr4-unicode-properties.patch # Fix some javadoc problems # https://github.com/antlr/antlr4/pull/2960 Patch1: antlr4-javadoc.patch BuildRequires: make BuildRequires: help2man BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} %description This package provides the runtime library used by Python 3 ANTLR parsers. %prep %autosetup -n antlr4-%{version} -p1 # Update for recent stringtemplate versions sed -i 's,\\>,>,g' tool/resources/org/antlr/v4/tool/templates/unicodedata.st %build cd runtime/Python3 %py3_build cd - %install # Install the Python 3 runtime cd runtime/Python3 %py3_install sed 's,#!python,#!%{python3},' bin/pygrun > %{buildroot}%{_bindir}/pygrun touch -r bin/pygrun %{buildroot}%{_bindir}/pygrun chmod 0755 %{buildroot}%{_bindir}/pygrun cd - %files %doc runtime/Python3/README.txt %license LICENSE.txt %{_bindir}/pygrun %python3_sitelib/antlr4/ %python3_sitelib/antlr4*.egg-info/ %changelog * Wed Apr 28 2021 Alexander Larsson - 4.9.2-1 - Initial python-only RPM, based on fedora antlr4-project.spec