Exemplo n.º 1
0
 def get_release_from_binary(cls, binary):
     try:
         pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary))
         return cls.get_release_from_tag(
             pex_info.build_properties.get('tag', ''))
     except PythonDirectoryWrapper.Error:
         return 'UNKNOWN'
Exemplo n.º 2
0
 def __init__(self, pex=sys.argv[0]):
   self._pex = PythonDirectoryWrapper.get(pex)
   self._pex_info = PexInfo.from_pex(self._pex)
   self._env = PEXEnvironment(self._pex.path(), self._pex_info)