You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python supports two ways to start programs: by file, or by module name.
Today, only file is supported. This is a FR for -m to also be supported. There's two main use cases for this style:
Using a file not in the same Bazel package as main.
Specifying a main that comes from dependencies, and referencing the actual main file directly is problematic.
Some example use cases:
When using a macro to generate a test/binary.
pytest: a common main is used and the tests to execute are passed as arguments or discovered at runtime. This basically a special case of the above.
This should be fairly easy to implement using bootstrap script. It just requires passing the name of the main module to the stage2 bootstrap instead of the path to the main module.
Python supports two ways to start programs: by file, or by module name.
Today, only file is supported. This is a FR for
-m
to also be supported. There's two main use cases for this style:Some example use cases:
This should be fairly easy to implement using bootstrap script. It just requires passing the name of the main module to the stage2 bootstrap instead of the path to the main module.
Docs for
-m
: https://docs.python.org/3.10/using/cmdline.html#cmdoption-mSee also: runpy.run_module: https://docs.python.org/3.10/library/runpy.html#runpy.run_module
The text was updated successfully, but these errors were encountered: