Skip to content
Permalink
Browse files

Fix issue with compatibility_or_constraints() returning a tuple

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 3f30d390143553969564cd6a3ec0ee150e43fe97
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/python/pants/backend/python/subsystems/pex_build_util.py
@@ -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:

0 comments on commit 3f30d39

Please sign in to comment.
You can’t perform that action at this time.