Skip to content

Commit

Permalink
revert some changes that make things harder to read
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 19, 2023
1 parent 46dfe95 commit 1f08c63
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions pex/pex_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,18 +763,14 @@ def zip_cache_dir(path):
)
with atomic_directory(cached_bootstrap_zip_dir) as atomic_bootstrap_zip_dir:
if not atomic_bootstrap_zip_dir.is_finalized():
bootstrap_output_file = os.path.join(
atomic_bootstrap_zip_dir.work_dir, pex_info.bootstrap
self._chroot.zip(
os.path.join(atomic_bootstrap_zip_dir.work_dir, pex_info.bootstrap),
deterministic_timestamp=deterministic_timestamp,
exclude_file=is_pyc_temporary_file,
strip_prefix=pex_info.bootstrap,
labels=("bootstrap",),
compress=compress,
)
with TRACER.timed("write out bootstrap zip to {}".format(bootstrap_output_file)):
self._chroot.zip(
bootstrap_output_file,
deterministic_timestamp=deterministic_timestamp,
exclude_file=is_pyc_temporary_file,
strip_prefix=pex_info.bootstrap,
labels=("bootstrap",),
compress=compress,
)
safe_copy(
os.path.join(cached_bootstrap_zip_dir, pex_info.bootstrap),
os.path.join(dirname, pex_info.bootstrap),
Expand All @@ -791,18 +787,14 @@ def zip_cache_dir(path):
)
with atomic_directory(cached_installed_wheel_zip_dir) as atomic_zip_dir:
if not atomic_zip_dir.is_finalized():
current_output_file = os.path.join(atomic_zip_dir.work_dir, location)
with TRACER.timed(
"write out packed dist {} to {}".format(location, current_output_file)
):
self._chroot.zip(
current_output_file,
deterministic_timestamp=deterministic_timestamp,
exclude_file=is_pyc_temporary_file,
strip_prefix=os.path.join(pex_info.internal_cache, location),
labels=(location,),
compress=compress,
)
self._chroot.zip(
os.path.join(atomic_zip_dir.work_dir, location),
deterministic_timestamp=deterministic_timestamp,
exclude_file=is_pyc_temporary_file,
strip_prefix=os.path.join(pex_info.internal_cache, location),
labels=(location,),
compress=compress,
)
safe_copy(
os.path.join(cached_installed_wheel_zip_dir, location),
os.path.join(internal_cache, location),
Expand Down

0 comments on commit 1f08c63

Please sign in to comment.