Skip to content

Commit

Permalink
packages.py checks if it should run PEX or ./pants.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Apr 2, 2019
1 parent 2e6cef0 commit 35979e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/python/pants/releases/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def build_and_print_packages(version, py3=False):
packages_by_flags[package.bdist_wheel_flags].append(package)

for (flags, packages) in packages_by_flags.items():
args = ("./pants", "-q", "setup-py", "--run=bdist_wheel {}".format(" ".join(flags))) + tuple(package.target for package in packages)
pants_script = "./pants.pex" if "RUN_PANTS_FROM_PEX" in os.environ else "./pants"
targets = tuple(package.target for package in packages)
args = (pants_script, "--quiet", "setup-py", "--run=bdist_wheel {}".format(" ".join(flags))) + targets
try:
subprocess.check_call(args)
for package in packages:
Expand Down

0 comments on commit 35979e8

Please sign in to comment.