14
14
15
15
import platform
16
16
17
- from platformio .compat import PY36 , is_proxy_set
17
+ from platformio .compat import is_proxy_set
18
18
19
19
20
20
def get_core_dependencies ():
@@ -30,7 +30,8 @@ def get_core_dependencies():
30
30
31
31
def get_pip_dependencies ():
32
32
core = [
33
- "bottle == %s" % ("0.12.*" if PY36 else "0.13.*" ),
33
+ 'bottle == 0.12.*; python_version < "3.7"' ,
34
+ 'bottle == 0.13.*; python_version >= "3.7"' ,
34
35
"click >=8.0.4, <9" ,
35
36
"colorama" ,
36
37
"marshmallow == 3.*" ,
@@ -45,15 +46,18 @@ def get_pip_dependencies():
45
46
# PIO Home requirements
46
47
"ajsonrpc == 1.2.*" ,
47
48
"starlette >=0.19, <0.40" ,
48
- "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.31" ),
49
+ 'uvicorn == 0.16.0; python_version < "3.7"' ,
50
+ 'uvicorn >=0.16, <0.31; python_version >= "3.7"' ,
49
51
"wsproto == 1.*" ,
50
52
]
51
53
52
54
extra = []
53
55
54
56
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
55
57
if platform .system () == "Darwin" and "arm" in platform .machine ().lower ():
56
- extra .append ("chardet>=3.0.2,<6" )
58
+ extra .append (
59
+ 'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
60
+ )
57
61
58
62
# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
59
63
try :
0 commit comments