File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,5 @@ def get_version(rel_path: str) -> str:
81
81
],
82
82
},
83
83
zip_safe = False ,
84
- # NOTE: python_requires is duplicated in __pip-runner__.py.
85
- # When changing this value, please change the other copy as well.
86
84
python_requires = ">=3.7" ,
87
85
)
Original file line number Diff line number Diff line change 12
12
from typing import Optional , Sequence , Union
13
13
14
14
PIP_SOURCES_ROOT = dirname (dirname (__file__ ))
15
- # Copied from setup.py
16
- PYTHON_REQUIRES = ">=3.7"
17
15
18
16
19
17
class PipImportRedirectingFinder :
@@ -32,21 +30,7 @@ def find_spec(
32
30
return spec
33
31
34
32
35
- def check_python_version () -> None :
36
- # Import here to ensure the imports happen after the sys.meta_path change.
37
- from pip ._vendor .packaging .specifiers import SpecifierSet
38
- from pip ._vendor .packaging .version import Version
39
-
40
- py_ver = Version ("{0.major}.{0.minor}.{0.micro}" .format (sys .version_info ))
41
- if py_ver not in SpecifierSet (PYTHON_REQUIRES ):
42
- raise SystemExit (
43
- f"This version of pip does not support python { py_ver } "
44
- f"(requires { PYTHON_REQUIRES } )"
45
- )
46
-
47
-
48
33
sys .meta_path .insert (0 , PipImportRedirectingFinder ())
49
34
50
35
assert __name__ == "__main__" , "Cannot run __pip-runner__.py as a non-main module"
51
- check_python_version ()
52
36
runpy .run_module ("pip" , run_name = "__main__" , alter_sys = True )
You can’t perform that action at this time.
0 commit comments