-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
__init__.py
61 lines (55 loc) · 1.83 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from pathlib import Path
from virtualenv.seed.wheels.util import Wheel
BUNDLE_FOLDER = Path(__file__).absolute().parent
BUNDLE_SUPPORT = {
"3.11": {
"pip": "pip-22.3.1-py3-none-any.whl",
"setuptools": "setuptools-65.5.1-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.10": {
"pip": "pip-22.3.1-py3-none-any.whl",
"setuptools": "setuptools-65.5.1-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.9": {
"pip": "pip-22.3.1-py3-none-any.whl",
"setuptools": "setuptools-65.5.1-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.8": {
"pip": "pip-22.3.1-py3-none-any.whl",
"setuptools": "setuptools-65.5.1-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.7": {
"pip": "pip-22.3.1-py3-none-any.whl",
"setuptools": "setuptools-65.5.1-py3-none-any.whl",
"wheel": "wheel-0.38.4-py3-none-any.whl",
},
"3.6": {
"pip": "pip-21.3.1-py3-none-any.whl",
"setuptools": "setuptools-59.6.0-py3-none-any.whl",
"wheel": "wheel-0.37.1-py2.py3-none-any.whl",
},
"3.5": {
"pip": "pip-20.3.4-py2.py3-none-any.whl",
"setuptools": "setuptools-50.3.2-py3-none-any.whl",
"wheel": "wheel-0.37.1-py2.py3-none-any.whl",
},
"2.7": {
"pip": "pip-20.3.4-py2.py3-none-any.whl",
"setuptools": "setuptools-44.1.1-py2.py3-none-any.whl",
"wheel": "wheel-0.37.1-py2.py3-none-any.whl",
},
}
MAX = "3.11"
def get_embed_wheel(distribution, for_py_version):
path = BUNDLE_FOLDER / (BUNDLE_SUPPORT.get(for_py_version, {}) or BUNDLE_SUPPORT[MAX]).get(distribution)
return Wheel.from_path(path)
__all__ = [
"get_embed_wheel",
"BUNDLE_SUPPORT",
"MAX",
"BUNDLE_FOLDER",
]