MCPcopy Create free account
hub / github.com/numpy/numpy / get_linux

Function get_linux

tools/openblas_support.py:73–92  ·  view source on GitHub ↗
(arch)

Source from the content-addressed store, hash-verified

71
72
73def get_linux(arch):
74 # best way of figuring out whether manylinux or musllinux is to look
75 # at the packaging tags. If packaging isn't installed (it's not by default)
76 # fallback to sysconfig (which may be flakier)
77 try:
78 from packaging.tags import sys_tags
79 tags = list(sys_tags())
80 plat = tags[0].platform
81 except ImportError:
82 # fallback to sysconfig for figuring out if you're using musl
83 plat = 'manylinux'
84 # value could be None
85 v = sysconfig.get_config_var('HOST_GNU_TYPE') or ''
86 if 'musl' in v:
87 plat = 'musllinux'
88
89 if 'manylinux' in plat:
90 return get_manylinux(arch)
91 elif 'musllinux' in plat:
92 return get_musllinux(arch)
93
94
95def download_openblas(target, plat, ilp64, *, nightly=False):

Callers 1

download_openblasFunction · 0.85

Calls 2

get_manylinuxFunction · 0.85
get_musllinuxFunction · 0.85

Tested by

no test coverage detected