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]