diff --git a/bnf/setup.py b/bnf/setup.py index 24d41c4..745595d 100644 --- a/bnf/setup.py +++ b/bnf/setup.py @@ -1,4 +1,5 @@ import subprocess +import shutil from pathlib import Path from setuptools import setup from setuptools.command.build_py import build_py @@ -10,6 +11,11 @@ def run(self): super().run() def generate_antlr_parsers(self): + if not shutil.which("antlr4"): + print("Warning: antlr4 command not found. Skipping parser generation.") + print("This is normal when resolving dependencies (e.g., with Dependabot).") + return + base_dir = Path(__file__).parent grammars_dir = base_dir output_dir = base_dir / "apyds_bnf"