cibuildwheel analysis examples #605
henryiii
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Maybe we could add a pypi field for projects that don't share the GitHub name, that would simplify a lot. A bit messy, but easy to hack to investigate things like manylinux1 wheels. import requests
import yaml
from pathlib import Path
from packaging.version import Version, InvalidVersion
def correction(n: str) -> str:
if n == "mypy_mypyc-wheels":
return "mypy"
elif n == "PyAV":
return "av"
elif n == "jq.py":
return "jq"
elif n == "imagecodecs_build":
return "imagecodecs"
elif n == "PyTables":
return "tables"
elif n == "etebase-py":
return "etebase"
elif n == "python-dependency-injector":
return "dependency-injector"
elif n == "dd-trace-py":
return "ddtrace"
else:
return n
proj = yaml.safe_load(Path("docs/data/projects.yml").read_text())
libs = [correction(p["gh"].split("/")[-1]) for p in proj]
def is_valid(v: str) -> bool:
try:
return not Version(v).is_prerelease and not Version(v).is_devrelease
except InvalidVersion:
return False
for lib in libs:
r = requests.get(f"https://pypi.python.org/pypi/{lib}/json")
if r.ok:
j = r.json()
req_py = j["info"]["requires_python"]
last = sorted((v for v in j["releases"] if is_valid(v)), key=lambda x: Version(x))[-1]
py2_wheels = ["-".join(s["filename"].split("-")[2:]) for s in j["releases"][last] if 'cp27' in s["filename"]]
if not py2_wheels:
print(f"{lib}: {req_py}")
print(" ", last, *py2_wheels)
else:
print(f"{lib}: invalid") |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion is for scripts that explore the statistics of our known users.
Beta Was this translation helpful? Give feedback.
All reactions