patman: rename main script to __main__.py
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Mon, 19 Dec 2022 22:32:41 +0000 (17:32 -0500)
committerSimon Glass <sjg@chromium.org>
Fri, 6 Jan 2023 02:21:57 +0000 (19:21 -0700)
This allows running the package as a Python module, like e.g.:

    $ python -m patman

It also prevents Pytest from attempting to parse main.py, which
would cause errors.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Fix up main.py in __init__.py:
Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/__init__.py
tools/patman/__main__.py [moved from tools/patman/main.py with 100% similarity]
tools/patman/patman

index c9d3e35..1b98ec7 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 __all__ = ['checkpatch', 'command', 'commit', 'control', 'cros_subprocess',
-           'func_test', 'get_maintainer', 'gitutil', 'main', 'patchstream',
+           'func_test', 'get_maintainer', 'gitutil', '__main__', 'patchstream',
            'project', 'series', 'setup', 'settings', 'terminal',
            'test_checkpatch', 'test_util', 'tools', 'tout']
index 11a5d8e..5a427d1 120000 (symlink)
@@ -1 +1 @@
-main.py
\ No newline at end of file
+__main__.py
\ No newline at end of file