You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
632B

  1. import sys
  2. REQUIRED_PYTHON = "python3"
  3. def main():
  4. system_major = sys.version_info.major
  5. if REQUIRED_PYTHON == "python":
  6. required_major = 2
  7. elif REQUIRED_PYTHON == "python3":
  8. required_major = 3
  9. else:
  10. raise ValueError("Unrecognized python interpreter: {}".format(
  11. REQUIRED_PYTHON))
  12. if system_major != required_major:
  13. raise TypeError(
  14. "This project requires Python {}. Found: Python {}".format(
  15. required_major, sys.version))
  16. else:
  17. print(">>> Development environment passes all tests!")
  18. if __name__ == '__main__':
  19. main()