| 227 | |
| 228 | @property |
| 229 | def _loaded_envs(self): |
| 230 | # type: () -> Sequence[PEXEnvironment] |
| 231 | if self._envs is None: |
| 232 | # set up the local .pex environment |
| 233 | pex_info = self.pex_info() |
| 234 | target = LocalInterpreter.create(self._interpreter) |
| 235 | envs = [PEXEnvironment.mount(self._pex, pex_info, target=target)] |
| 236 | # N.B. by this point, `pex_info.pex_path` will contain a single pex path |
| 237 | # merged from pex_path in `PEX-INFO` and `PEX_PATH` set in the environment. |
| 238 | # `PEX_PATH` entries written into `PEX-INFO` take precedence over those set |
| 239 | # in the environment. |
| 240 | for pex_path in pex_info.pex_path: |
| 241 | # Set up other environments as specified in pex_path. |
| 242 | pex_info = PexInfo.from_pex(pex_path) |
| 243 | pex_info.update(self._pex_info_overrides) |
| 244 | envs.append(PEXEnvironment.mount(pex_path, pex_info, target=target)) |
| 245 | self._envs = envs |
| 246 | return self._envs |
| 247 | |
| 248 | def resolve(self): |
| 249 | # type: () -> Iterator[Distribution] |