diff --git a/sample/__init__.py b/sample/__init__.py index db836cee..e69de29b 100644 --- a/sample/__init__.py +++ b/sample/__init__.py @@ -1,4 +0,0 @@ - -def main(): - """Entry point for the application script""" - print("Call your main application code here") diff --git a/sample/__main__.py b/sample/__main__.py new file mode 100644 index 00000000..4d498e4e --- /dev/null +++ b/sample/__main__.py @@ -0,0 +1,8 @@ + +def main(): + """Entry point for the application script""" + print("Call your main application code here") + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index 27227e0b..c3625f20 100644 --- a/setup.py +++ b/setup.py @@ -162,7 +162,7 @@ # executes the function `main` from this package when invoked: entry_points={ # Optional 'console_scripts': [ - 'sample=sample:main', + 'sample=sample.__main__:main', ], },