Skip to content

Commit

Permalink
Restore pex.pex_bootstrapper.is_compressed API.
Browse files Browse the repository at this point in the history
This was eliminated in #680 since it was (locally) unused but it turns
out it was used over in lambdex. The long term fix allowing safe
removal of the API is tracked by:
pex-tool/lambdex#5.

Fixes #684
  • Loading branch information
jsirois committed Mar 26, 2019
1 parent 45ef407 commit c3094b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pex/pex_bootstrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ def bootstrap_pex(entry_point):
pex.PEX(entry_point).execute()


# NB: This helper is used by third party libs - namely https://github.com/wickman/lambdex.
# TODO(John Sirois): Kill once https://github.com/wickman/lambdex/issues/5 is resolved.
def is_compressed(entry_point):
from .pex_info import PexInfo
return os.path.exists(entry_point) and not os.path.exists(os.path.join(entry_point, PexInfo.PATH))


def bootstrap_pex_env(entry_point):
"""Bootstrap the current runtime environment using a given pex."""
pex_info = _bootstrap(entry_point)
Expand Down

0 comments on commit c3094b0

Please sign in to comment.