File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ version_scheme = "no-guess-dev"
2626fallback_version = " 0.0.0"
2727root = " .."
2828
29- [tool .setuptools . packages . find ]
30- include = [" apyds_bnf" ]
29+ [tool .setuptools ]
30+ packages = [" apyds_bnf" ]
3131
3232[project .optional-dependencies ]
3333dev = [
Original file line number Diff line number Diff line change 1- """
2- Setup script for apyds-bnf package with ANTLR parser generation
3- """
4-
51import subprocess
62from pathlib import Path
7-
83from setuptools import setup
94from setuptools .command .build_py import build_py
105
116
127class BuildWithAntlr (build_py ):
13- """Custom build command that generates ANTLR parsers before building"""
14-
158 def run (self ):
16- """Generate ANTLR parsers and then run the standard build"""
179 self .generate_antlr_parsers ()
1810 super ().run ()
1911
2012 def generate_antlr_parsers (self ):
21- """Generate Python parsers from ANTLR grammars"""
2213 base_dir = Path (__file__ ).parent
2314 grammars_dir = base_dir
2415 output_dir = base_dir / "apyds_bnf"
2516
26- # Generate parsers for both grammars
2717 for grammar in ["Ds.g4" , "Dsp.g4" ]:
2818 grammar_path = grammars_dir / grammar
2919
@@ -44,7 +34,6 @@ def generate_antlr_parsers(self):
4434 print (f"Successfully generated parser for { grammar } " )
4535
4636
47- # Use pyproject.toml for configuration, but provide custom build command
4837if __name__ == "__main__" :
4938 setup (
5039 cmdclass = {
You can’t perform that action at this time.
0 commit comments