Skip to content

Commit

Permalink
Fix issue with compatibility_or_constraints() returning a tuple
Browse files Browse the repository at this point in the history
add_interpreter_constraints() expects a str, so we must unpack the tuple when calling it.
  • Loading branch information
Eric-Arellano committed Feb 27, 2019
1 parent ff17f73 commit 3f30d39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/python/pants/backend/python/subsystems/pex_build_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ def add_interpreter_constraints_from(self, constraint_tgts):
# TODO this would be a great place to validate the constraints and present a good error message
# if they are incompatible because all the sources of the constraints are available.
# See: https://github.com/pantsbuild/pex/blob/584b6e367939d24bc28aa9fa36eb911c8297dac8/pex/interpreter_constraints.py
constraints = {self._python_setup_subsystem.compatibility_or_constraints(tgt) for tgt in constraint_tgts}
for constraint in constraints:
self.add_interpreter_constraint(constraint)
constraint_tuples = {self._python_setup_subsystem.compatibility_or_constraints(tgt) for tgt in constraint_tgts}
for constraint_tuple in constraint_tuples:
for constraint in constraint_tuple:
self.add_interpreter_constraint(constraint)

def add_direct_requirements(self, reqs):
for req in reqs:
Expand Down

0 comments on commit 3f30d39

Please sign in to comment.