summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python3-antlr4.spec60
-rw-r--r--sources1
3 files changed, 62 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..04d2cc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/python3-antlr4-4.9.1.tar.gz
diff --git a/python3-antlr4.spec b/python3-antlr4.spec
new file mode 100644
index 0000000..0ef96c5
--- /dev/null
+++ b/python3-antlr4.spec
@@ -0,0 +1,60 @@
+# ANTLR 4 Python 3 runtime — built from runtime/Python3/ subdirectory of the antlr4 repo
+# topdir after extract: python-antlr4-4.9.1 (normalized by tar --transform)
+# build dir: runtime/Python3/ (contains setup.py, no pyproject.toml)
+# Build method: setup.py (setuptools) per spec-rules-python.md §判断3
+# LANG override: gate detected java (root pom.xml) but actual package is Python
+
+Name: python-antlr4
+Version: 4.9.1
+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/%{version}/python3-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. This package contains the ANTLR 4 runtime for Python 3.
+
+
+%package -n python3-antlr4
+Summary: ANTLR 4 runtime for Python 3
+Provides: python-antlr4
+Provides: python3dist(antlr4-python3-runtime) = %{version}
+
+%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. This package contains the ANTLR 4 runtime for Python 3.
+
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+
+%build
+cd runtime/Python3
+%py3_build
+
+
+%install
+cd runtime/Python3
+%py3_install
+
+
+%files -n python3-antlr4
+%license LICENSE.txt
+%doc README.md
+%{python3_sitelib}/antlr4/
+%{python3_sitelib}/antlr4_python3_runtime*.egg-info/
+%{_bindir}/pygrun
+
+
+%changelog
+* Wed Sep 23 2026 Python_Bot <Python_Bot@openeuler.org> - 4.9.1-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..84bdc84
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2de06c21eb55c1a91c90a92796ed0b41 python3-antlr4-4.9.1.tar.gz