/
opt
/
gsutil
/
gslib
/
utils
/
__pycache__
/
up file
home
a +(Wg� � @ s, d Z ddlZddlmZ ddiZdd� ZdS )zBUtility functions to ensure the correct version of Python is used.� N)�version_info� � c C sT t jj} t jj}| tvr(ddj| d�fS |t| k rPt| }ddj| ||d�fS dS )a� Return an exception if running in an unsupported version of Python. This function compares the running version of cPython and against the list of supported python version. If the running version is less than any of the supported versions, return a Tuple of (False, Str(error message)) for the caller to handle. Minor versions of Python greater than those listed in the supported versions are allowed. Args: None Returns: Tuple(Boolean, String) A Tuple containing a Boolean and a String. The boolean represents if the version is supported, and the String will either be empty, or contain an error message. Fz3Gsutil does not support running under Python{major})�majorziFor Python{major}, gsutil requires Python{major}.{lowest_minor}+, but you are using Python{major}.{minor}�r �minorZlowest_minor)T� )�sysr r r �MIN_SUPPORTED_PYTHON_VERSION�formatr � r �(/opt/gsutil/gslib/utils/version_check.py�check_python_version_support s ���r )�__doc__r r r r r r r r �<module> s