Skip to content

Commit

Permalink
Revert pants run mods and fix bug in pex build util
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Livingston committed Jan 30, 2018
1 parent 1c981f7 commit 6881a72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/tasks/pex_build_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def prepare_dist_workdir(dist_tgt, workdir, log):
for source_relative_to_build_root, source_relative_to_target_base in sources:
source_rel_to_dist_dir = os.path.join(dist_target_dir, source_relative_to_target_base)
if not os.path.exists(os.path.dirname(source_rel_to_dist_dir)):
os.makedirs(os.path.dirname(path_to_source))
os.makedirs(os.path.dirname(source_rel_to_dist_dir))
shutil.copyfile(os.path.join(get_buildroot(), source_relative_to_build_root),
source_rel_to_dist_dir)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class ResolveRequirementsTaskBase(Task):
@classmethod
def prepare(cls, options, round_manager):
round_manager.require_data(PythonInterpreter)
round_manager.require_data('python-dists')

def resolve_requirements(self, req_libs, local_python_dist_targets=None):
"""Requirements resolution for PEX files.
Expand Down Expand Up @@ -61,7 +60,4 @@ def resolve_requirements(self, req_libs, local_python_dist_targets=None):
def _build_requirements_pex(self, interpreter, path, req_libs, local_python_dist_targets=None):
builder = PEXBuilder(path=path, interpreter=interpreter, copy=True)
dump_requirements(builder, interpreter, req_libs, self.context.log)
built_dists = self.context.products.get_data('python-dists')
for dist in built_dists:
builder.add_dist_location(dist)
builder.freeze()

0 comments on commit 6881a72

Please sign in to comment.