Skip to content

Commit

Permalink
Consume versioned PEX releases (#260)
Browse files Browse the repository at this point in the history
See pantsbuild/pants#19683 for the related
Pantsbuild automation change.

This change makes it so we now consume PEX names with the expected Pants
version in them.

This change isn't guarded by version, as I expect to backport this
change to earlier releases.
  • Loading branch information
thejcannon authored Aug 29, 2023
1 parent 12ab12a commit 891972b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/src/scie_pants/install_pants.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def install_pants_from_pex(
"""Installs Pants into the venv using the platform-specific pre-built PEX."""
uname = os.uname()
major, minor = sys.version_info[:2]
pex_name = f"pants.cp{major}{minor}-{uname.sysname.lower()}_{uname.machine.lower()}.pex"
pex_name = (
f"pants.{version}-cp{major}{minor}-{uname.sysname.lower()}_{uname.machine.lower()}.pex"
)
pex_url = f"https://github.com/pantsbuild/pants/releases/download/release_{version}/{pex_name}"
with tempfile.NamedTemporaryFile(suffix=".pex") as pants_pex:
pex_url = (
f"https://github.com/pantsbuild/pants/releases/download/release_{version}/{pex_name}"
)
try:
ptex.fetch_to_fp(pex_url, pants_pex.file)
except subprocess.CalledProcessError as e:
Expand Down

0 comments on commit 891972b

Please sign in to comment.