Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
checkpip.py33 linesDownload Raw Back to scripts
1#!/usr/bin/env python32"""3Checks that the version of the projects bundled in ensurepip are the latest4versions available.5"""6import ensurepip7import json8import urllib.request9import sys10 11 12def main():13    outofdate = False14 15    for project, version in ensurepip._PROJECTS:16        data = json.loads(urllib.request.urlopen(17            "https://pypi.org/pypi/{}/json".format(project),18            cadefault=True,19        ).read().decode("utf8"))20        upstream_version = data["info"]["version"]21 22        if version != upstream_version:23            outofdate = True24            print("The latest version of {} on PyPI is {}, but ensurepip "25                  "has {}".format(project, upstream_version, version))26 27    if outofdate:28        sys.exit(1)29 30 31if __name__ == "__main__":32    main()33 
codekingpro/portable-devtools · Team Ai