Move core/pip dependencies to the separate "dependencies" module

This commit is contained in:
Ivan Kravets
2024-03-18 13:14:22 +02:00
parent 56be27fb0b
commit 28bd200cd6
9 changed files with 41 additions and 36 deletions
+11
View File
@@ -17,6 +17,7 @@
import importlib.util
import inspect
import locale
import os
import shlex
import sys
@@ -45,6 +46,7 @@ else:
PY2 = sys.version_info[0] == 2 # DO NOT REMOVE IT. ESP8266/ESP32 depend on it
PY36 = sys.version_info[0:2] == (3, 6)
IS_CYGWIN = sys.platform.startswith("cygwin")
IS_WINDOWS = WINDOWS = sys.platform.startswith("win")
IS_MACOS = sys.platform.startswith("darwin")
@@ -132,3 +134,12 @@ def path_to_unicode(path):
and custom device monitor filters
"""
return path
def is_proxy_set(socks=False):
for var in ("HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY"):
value = os.getenv(var, os.getenv(var.lower()))
if not value or (socks and not value.startswith("socks5://")):
continue
return True
return False