Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 24.1 #213

Merged
merged 2 commits into from
Jun 20, 2024
Merged
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
33,036 changes: 33,036 additions & 0 deletions public/3.7/get-pip.py

Large diffs are not rendered by default.

61,269 changes: 28,387 additions & 32,882 deletions public/get-pip.py

Large diffs are not rendered by default.

Binary file modified public/pip.pyz
Binary file not shown.
Binary file added public/zipapp/pip-24.1.pyz
Binary file not shown.
Binary file added public/zipapp/pip-24.1b1.pyz
Binary file not shown.
Binary file added public/zipapp/pip-24.1b2.pyz
Binary file not shown.
20 changes: 17 additions & 3 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
"setuptools": "",
"wheel": "",
},
"3.7": {
"pip": "<24.1",
"setuptools": "",
"wheel": "",
},
}

# This is the oldest version of pip we will distribute as a zipapp.
Expand Down Expand Up @@ -292,7 +297,12 @@ def zipapp_location(pip_version: Version) -> Path:
return zipapp_dir / f"pip-{pip_version}.pyz"


def generate_zipapp(pip_version: Version, *, console: Console, pip_versions: Dict[Version, Tuple[str, str]]) -> None:
def generate_zipapp(
pip_version: Version,
*,
console: Console,
pip_versions: Dict[Version, Tuple[str, str]],
) -> None:
wheel_url, wheel_hash = pip_versions[pip_version]
console.log(f" Downloading [green]{Path(wheel_url).name}")
original_wheel = download_wheel(wheel_url, wheel_hash)
Expand Down Expand Up @@ -326,7 +336,9 @@ def generate_zipapp(pip_version: Version, *, console: Console, pip_versions: Dic
major, minor = map(int, m.groups())
console.log(f" Zipapp requires Python {py_req}")
else:
console.log(f" Python requirement {py_req} too complex - check skipped")
console.log(
f" Python requirement {py_req} too complex - check skipped"
)

# Write the main script
# Use a ZipInfo object to ensure reproducibility - otherwise the current time
Expand All @@ -341,7 +353,9 @@ def generate_zipapp(pip_version: Version, *, console: Console, pip_versions: Dic
# and we want a reproducible value, i.e., always use the same
# newline format.
template = Path("templates") / "zipapp_main.py"
zipapp_main = template.read_text(encoding="utf-8").format(major=major, minor=minor)
zipapp_main = template.read_text(encoding="utf-8").format(
major=major, minor=minor
)
dest.writestr(main_info, zipapp_main)


Expand Down
Loading