__main__.py 512 B

12345678910111213141516171819202122232425
  1. """
  2. Wheel command line tool (enables the ``python -m wheel`` syntax)
  3. """
  4. from __future__ import annotations
  5. import sys
  6. from typing import NoReturn
  7. def main() -> NoReturn: # needed for console script
  8. if __package__ == "":
  9. # To be able to run 'python wheel-0.9.whl/wheel':
  10. import os.path
  11. path = os.path.dirname(os.path.dirname(__file__))
  12. sys.path[0:0] = [path]
  13. from ._commands import main as cli_main
  14. sys.exit(cli_main())
  15. if __name__ == "__main__":
  16. main()