summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python3-antlr4.spec64
-rw-r--r--sources1
3 files changed, 66 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..a516cac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/python-antlr4-4.13.2.tar.gz
diff --git a/python3-antlr4.spec b/python3-antlr4.spec
new file mode 100644
index 0000000..a927964
--- /dev/null
+++ b/python3-antlr4.spec
@@ -0,0 +1,64 @@
+%global pypi_name antlr4-python3-runtime
+
+Name: python-antlr4
+Version: 4.13.2
+Release: 1%{?dist}
+Summary: ANTLR 4 runtime for Python 3
+License: BSD-3-Clause
+URL: https://github.com/antlr/antlr4
+Source0: https://github.com/antlr/antlr4/archive/refs/tags/v%{version}/python-antlr4-%{version}.tar.gz
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+%description
+ANTLR (ANother Tool for Language Recognition) is a powerful parser generator
+for reading, processing, executing, or translating structured text or binary
+files. The Python 3 runtime library provides the base classes that generated
+parsers and lexers use.
+
+%package -n python3-antlr4
+Summary: ANTLR 4 runtime for Python 3
+Provides: python3-%{pypi_name} = %{version}-%{release}
+Provides: python3dist(%{pypi_name}) = %{version}
+Requires: python3
+
+%description -n python3-antlr4
+ANTLR (ANother Tool for Language Recognition) is a powerful parser generator
+for reading, processing, executing, or translating structured text or binary
+files. The Python 3 runtime library provides the base classes that generated
+parsers and lexers use.
+
+%package help
+Summary: Development documents and examples for python-antlr4
+Provides: python3-antlr4-doc
+
+%description help
+Documentation and examples for the ANTLR 4 Python 3 runtime.
+
+%prep
+%autosetup -n %{name}-%{version}
+
+%build
+pushd runtime/Python3
+%py3_build
+popd
+
+%install
+pushd runtime/Python3
+%py3_install
+popd
+
+%files -n python3-antlr4
+%license LICENSE.txt
+%{python3_sitelib}/antlr4/
+%{python3_sitelib}/antlr4_python3_runtime-%{version}*.egg-info/
+%{_bindir}/pygrun
+
+%files help
+%doc runtime/Python3/README.txt
+
+%changelog
+* Sun Sep 20 2026 Python_Bot <Python_Bot@openeuler.org> - 4.13.2-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..98964d1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+134b335060fce25c52ecb935d2818cef python-antlr4-4.13.2.tar.gz