xdev.cli.available_package_versions module¶
CommandLine
xdev availpkg numpy
xdev availpkg opencv-python-headless
xdev availpkg scipy
xdev availpkg kwimage
xdev availpkg kwcoco
xdev availpkg torch
xdev availpkg line_profiler
xdev availpkg uritools
xdev availpkg textual
xdev availpkg networkx
xdev availpkg fsspec
xdev availpkg coverage
- class xdev.cli.available_package_versions.AvailablePackageConfig(*args, **kwargs)[source]¶
Bases:
DataConfig
Print a table of available versions of a python package on Pypi
Refactor of ~/local/tools/supported_python_versions_pip.py to report the available versions of a python package that meet some critera
Valid options: []
- Parameters:
*args – positional arguments for this data config
**kwargs – keyword arguments for this data config
- default = {'package_name': <Value(None)>, 'refresh': <Value(False)>, 'request_min': <Value(None)>}¶
- xdev.cli.available_package_versions.main(cmdline=1, **kwargs)[source]¶
Example
>>> # xdoctest: +SKIP >>> cmdline = 0 >>> kwargs = dict( >>> ) >>> main(cmdline=cmdline, **kwargs)
- class xdev.cli.available_package_versions.ReqPythonVersionSpec(pattern)[source]¶
Bases:
object
For python_version specs in requirements files
Example
>>> pattern = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' >>> other = '3.7.2' >>> reqspec = ReqPythonVersionSpec(pattern) >>> reqspec.highest_explicit() >>> reqspec.matches('2.6') >>> reqspec.matches('2.7')
Example
>>> self = ReqPythonVersionSpec('~=3.2') >>> self.highest_explicit()
- xdev.cli.available_package_versions.parse_platform_tag(platform_tag)[source]¶
Parse finer grained information out of the package platform tag.
Example
>>> cases = [ >>> 'manylinux1_x86_64', >>> 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64', >>> 'manylinux1_i686', >>> 'win32', >>> 'win_amd64', >>> 'macosx_10_9_x86_64', >>> 'macosx_10_9_intel', >>> 'macosx_10_6_intel', >>> 'manylinux2010_i686', >>> 'manylinux2010_x86_64', >>> 'manylinux2014_aarch64', >>> 'manylinux_2_12_i686.manylinux2010_i686', >>> 'manylinux_2_12_x86_64.manylinux2010_x86_64', >>> 'manylinux_2_17_aarch64.manylinux2014_aarch64', >>> 'manylinux_2_5_i686.manylinux1_i686', >>> 'manylinux_2_5_x86_64.manylinux1_x86_64', >>> 'macosx_10_9_universal2', >>> 'macosx_11_0_arm64', >>> 'manylinux_2_17_x86_64.manylinux2014_x86_64', >>> 'macosx_10_14_x86_64', >>> 'macosx_10_15_x86_64', >>> 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64'] >>> for platform_tag in cases: >>> plat_info = parse_platform_tag(platform_tag) >>> print(f'platform_tag={platform_tag}') >>> print('plat_info = {}'.format(ub.repr2(plat_info, nl=1)))
- xdev.cli.available_package_versions.grab_pypi_items(package_name, refresh=False)[source]¶
Get all the information about a package from pypi
- xdev.cli.available_package_versions.summarize_package_availability(package_name)[source]¶
Todo
for each released version of the package we want to know
- For source distros:
Does it need to be compiled?
What are is the min (or max?) python version
- For binaries:
What python version, arch, and os targets are available.
- class xdev.cli.available_package_versions.PythonVersions[source]¶
Bases:
object
Class that contains information about different Python versions