From c6efc9b90b2d14bdb04818bae5d32924dc21f53b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 17 Feb 2024 20:05:31 +0100 Subject: [PATCH] main --- ofsp/__init__.py | 7 +++++++ ofsp/__main__.py | 6 +----- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ofsp/__init__.py b/ofsp/__init__.py index 79d08ad..2222989 100644 --- a/ofsp/__init__.py +++ b/ofsp/__init__.py @@ -1,5 +1,7 @@ __version__ = '0.0.0' +import sys + import rwx.log log = rwx.log.get_logger(__name__) @@ -28,3 +30,8 @@ class Build: self.init() self.build() self.squash() + + +def main(): + _, output_root = sys.argv + print(output_root) diff --git a/ofsp/__main__.py b/ofsp/__main__.py index 3d7637c..cd6d791 100755 --- a/ofsp/__main__.py +++ b/ofsp/__main__.py @@ -1,10 +1,6 @@ #! /usr/bin/env python3 -import sys - - -def main(): - _, output_root = sys.argv +from ofsp import main if __name__ == '__main__': diff --git a/pyproject.toml b/pyproject.toml index e75fe6a..c0e8f0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ readme = 'readme.md' requires-python = '>= 3.10' [project.scripts] -# command = 'package.module:function' +ofsp = 'ofsp:main' [project.urls]