Skip to content

Commit fdf56e1

Browse files
committed
Update setup.py for apyds_bnf.
1 parent 2c1cc93 commit fdf56e1

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

bnf/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ version_scheme = "no-guess-dev"
2626
fallback_version = "0.0.0"
2727
root = ".."
2828

29-
[tool.setuptools.packages.find]
30-
include = ["apyds_bnf"]
29+
[tool.setuptools]
30+
packages = ["apyds_bnf"]
3131

3232
[project.optional-dependencies]
3333
dev = [

bnf/setup.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
1-
"""
2-
Setup script for apyds-bnf package with ANTLR parser generation
3-
"""
4-
51
import subprocess
62
from pathlib import Path
7-
83
from setuptools import setup
94
from setuptools.command.build_py import build_py
105

116

127
class 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
4837
if __name__ == "__main__":
4938
setup(
5039
cmdclass={

0 commit comments

Comments
 (0)