From 1ab51646b9a0685f52081eb59f277014e85d3bd4 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 12 Feb 2025 18:48:45 +0000 Subject: [PATCH] add command line entrypoint --- pyproject.toml | 3 +++ src/python/qubed/__main__.py | 1 + 2 files changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index df0dec7..0feb744 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,9 @@ dependencies = [ "frozendict", ] +[project.scripts] +qubed = "qubed.__main__:main" + [tool.maturin] python-source = "src/python" module-name = "qubed.rust" diff --git a/src/python/qubed/__main__.py b/src/python/qubed/__main__.py index b28bafe..2dafdf2 100644 --- a/src/python/qubed/__main__.py +++ b/src/python/qubed/__main__.py @@ -29,6 +29,7 @@ def main(): # Read from standard input l = 0 for line in sys.stdin.readlines(): + l += 1 # Process data (For now, just echoing the input)