Sitelet https://github.com/astral-sh/python-build-standalone/pull/1297/files
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pythonbuild/downloads.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@
"python_tag": "cp314"
},
"cpython-3.15": {
"url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0rc2.tar.xz",
"size": 35544464,
"sha256": "8d93af5eaaaea5adfd41bd786a7ba3f03f2ad1ab57c6a65e0b963deab91d5ad7",
"version": "3.15.0rc2",
"url": "https://github.com/python/cpython/archive/55634044b61fec74af2114ff6390b7c84bd21bbf.tar.gz",
"size": 44376986,
"sha256": "8ecf4043ce1243b9f09786b732cf1ac6450e4992e480b330058783b9bd28a2e6",
"version": "3.15.0",
"licenses": [
"Python-2.0",
"CNRI-Python"
Expand Down
15 changes: 15 additions & 0 deletions pythonbuild/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,21 @@ def download_entry(key: str, dest_path: pathlib.Path, local_name=None) -> pathli
local_path = dest_path / (local_name or url[url.rindex("/") + 1 :])
download_to_path(url, local_path, size, sha256)

if key == "cpython-3.15":
repacked = dest_path / f"Python-{entry['version']}.tar.xz"
with tarfile.open(local_path) as source:
with tarfile.open(repacked, "w:xz", preset=0) as output:
for member in source:
content = source.extractfile(member) if member.isfile() else None
member.name = (
f"Python-{entry['version']}/{member.name.partition('/')[2]}"
)
member.pax_headers = {}
output.addfile(member, content)
if content is not None:
content.close()
local_path = repacked

return local_path


Expand Down
Loading