Skip to content
Permalink
Browse files

Add global interpreter constraints to Python binary creation

  • Loading branch information...
Eric-Arellano committed Feb 26, 2019
1 parent 887a8ef commit 3bca020672cfe3a3eb44ca21dcb199f84da03ec6
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/python/pants/backend/python/tasks/python_binary_create.py
@@ -15,6 +15,7 @@
has_python_sources, has_resources,
is_python_target)
from pants.backend.python.subsystems.python_native_code import PythonNativeCode
from pants.backend.python.subsystems.python_setup import PythonSetup
from pants.backend.python.targets.python_binary import PythonBinary
from pants.backend.python.targets.python_requirement_library import PythonRequirementLibrary
from pants.base.build_environment import get_buildroot
@@ -140,8 +141,9 @@ def _create_binary(self, binary_tgt, results_dir):
if is_python_target(tgt):
constraint_tgts.append(tgt)

# Add target's interpreter compatibility constraints to pex info.
# Add global and target-level interpreter compatibility constraints to pex info.
pex_builder.add_interpreter_constraints_from(constraint_tgts)
pex_builder.add_interpreter_constraints(PythonSetup.global_instance().interpreter_constraints)

# Dump everything into the builder's chroot.
for tgt in source_tgts:

0 comments on commit 3bca020

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