diff --git a/.github/workflows/run-unittest.yml b/.github/workflows/run-unittest.yml index d97607a..2e39584 100644 --- a/.github/workflows/run-unittest.yml +++ b/.github/workflows/run-unittest.yml @@ -6,7 +6,6 @@ on: push: branches: [ "main" ] paths: - - 'bin/**' - 'codebasin/**' - 'etc/**' - 'tests/**' @@ -15,7 +14,6 @@ on: pull_request: branches: [ "main" ] paths: - - 'bin/**' - 'codebasin/**' - 'etc/**' - 'tests/**' diff --git a/bin/codebasin b/codebasin/__main__.py similarity index 99% rename from bin/codebasin rename to codebasin/__main__.py index 5ced861..872b933 100755 --- a/bin/codebasin +++ b/codebasin/__main__.py @@ -240,6 +240,7 @@ def report_enabled(name): if __name__ == "__main__": try: + sys.argv[0] = "codebasin" main() except Exception as e: logging.getLogger("codebasin").error(str(e)) diff --git a/pyproject.toml b/pyproject.toml index 7ab7ba8..a2c9c9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,9 @@ dependencies = [ "jsonschema==4.21.1", ] +[project.scripts] +codebasin = "codebasin:__main__.main" + [project.urls] "Github" = "https://www.github.com/intel/code-base-investigator" "Issues" = "https://www.github.com/intel/code-base-investigator/issues" @@ -45,8 +48,6 @@ dev = [ ] [tool.setuptools] -# TODO this practice is deprecated and will need updating later -script-files = ["bin/codebasin"] include-package-data = true [tool.setuptools.packages.find]