Skip to content

Commit 6e57440

Browse files
committed
fix
1 parent 35e2feb commit 6e57440

4 files changed

Lines changed: 6 additions & 14 deletions

File tree

cli/entrypoint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def main():
3333
sys.exit(1)
3434

3535
try:
36-
raw = subprocess.check_output(["linecount", args.input])
36+
raw = subprocess.check_output(["aligncount_cpp", args.input])
3737
except FileNotFoundError:
38-
print("Error: C++ binary 'linecount' not found in PATH.", file=sys.stderr)
38+
print("Error: C++ binary 'aligncount_cpp' not found in PATH.", file=sys.stderr)
3939
sys.exit(1)
4040
except subprocess.CalledProcessError as e:
41-
print(f"Error: 'linecount' failed (exit {e.returncode}).", file=sys.stderr)
41+
print(f"Error: 'aligncount_cpp' failed (exit {e.returncode}).", file=sys.stderr)
4242
sys.exit(e.returncode)
4343

4444
# Use our new helper to produce the final string to print

cli/setup.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,12 @@
1111
# 2) Extract metadata
1212
metadata = cfg["metadata"]
1313
options = cfg["options"]
14-
entry_points = {
15-
"console_scripts": [
16-
line.strip()
17-
for line in cfg["options.entry_points"]["console_scripts"].splitlines()
18-
if line.strip()
19-
]
20-
}
2114

2215
# 3) Call setuptools.setup() with that metadata
2316
setup(
2417
name=metadata["name"],
2518
version=metadata["version"],
2619
description=metadata["description"],
2720
python_requires=options["python_requires"],
28-
packages=["cli"], # finds cli/__init__.py and entrypoint.py
29-
entry_points=entry_points,
21+
entry_points={"console_scripts":["aligncount = entrypoint:main"]},
3022
)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ python_requires = >=3.9,<3.14
99

1010
[options.entry_points]
1111
console_scripts =
12-
aligncount = entrypoint:main
12+
aligncount = cli.entrypoint:main

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
version=metadata["version"],
2626
description=metadata["description"],
2727
python_requires=options["python_requires"],
28-
packages=["cli"], # “cli” is the only Python package at the root
28+
packages=["cli"],
2929
entry_points=entry_points,
3030
)

0 commit comments

Comments
 (0)