1414
1515import platform
1616
17- from platformio .compat import PY36 , is_proxy_set
17+ from platformio .compat import is_proxy_set
1818
1919
2020def get_core_dependencies ():
@@ -30,7 +30,8 @@ def get_core_dependencies():
3030
3131def get_pip_dependencies ():
3232 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"' ,
3435 "click >=8.0.4, <9" ,
3536 "colorama" ,
3637 "marshmallow == 3.*" ,
@@ -45,15 +46,18 @@ def get_pip_dependencies():
4546 # PIO Home requirements
4647 "ajsonrpc == 1.2.*" ,
4748 "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"' ,
4951 "wsproto == 1.*" ,
5052 ]
5153
5254 extra = []
5355
5456 # issue #4702; Broken "requests/charset_normalizer" on macOS ARM
5557 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+ )
5761
5862 # issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
5963 try :
0 commit comments