def __init__(self):
system = sys.platform.lower()
if system == 'darwin':
self.platform = "mac"
elif system.startswith('linux'):
self.platform = 'linux'
elif system == 'win32':
self.platform = 'windows'
else:
self.platform = None
if self.platform:
self.local_path_field = "local_path_%s" % (self.platform)
else:
self.local_path_field = None
self.py_version = ".".join(str(x) for x in sys.version_info[:2])
# extract the OpenSSL version if we can. The version is only available in Python 2.7 and
# only if we successfully imported ssl
self.ssl_version = "unknown"
try:
self.ssl_version = ssl.OPENSSL_VERSION
except (AttributeError, NameError):
pass
评论列表
文章目录