Open 1ucian0 opened 3 weeks ago
PyPI dependency version is a reasonable request. We have this for some other package registries.
One thing that makes this a bit challenging in python is that whereas with npm for example, the dependencies are expressed as an object mapping package names to versions e.g:
{
"glob": "^10.4.1",
"global-agent": "^3.0.0",
"got": "^14.4.1",
"graphql": "16.8.2"
}
This makes it easy to take a package and return a version range.
With PyPI, requires_dist
is an array of strings expressing a package constraint (which may or may not include a version, and may include a bunch of other stuff) e.g:
[
"python-dateutil>=2.8.0",
"qiskit[crosstalk-pass,csp-layout-pass,qasm3-import,visualization]; extra == \"all\"",
"typing-extensions",
"importlib-metadata>=4.6; python_version < '3.10'",
"isort==5.13.2 ; extra == \"dev\""
]
That requires a bit more work to parse correctly.
:clipboard: Description
Would it be possible to query
requires_dist
inhttps://pypi.python.org/pypi/<pkg>/json
(orhttps://www.wheelodex.org/json/projects/%3Cpkg%3E
or similar) to create a badge with the version of a particular dependency?Some sort of generic
py-pi-versions-from-framework-classifiers
For example:
based on query https://pypi.org/pypi/qiskit/json
https://img.shields.io/pypi/dependency_versions/qiskit/numpy
generate