Explorar o código

tools: idf extra wheels url can be set by environment variables

Chen Yudong %!s(int64=3) %!d(string=hai) anos
pai
achega
e82ea9f1be
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      tools/idf_tools.py

+ 2 - 1
tools/idf_tools.py

@@ -94,6 +94,7 @@ URL_PREFIX_MAP_SEPARATOR = ','
 IDF_TOOLS_INSTALL_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD')
 IDF_TOOLS_EXPORT_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD')
 IDF_DL_URL = 'https://dl.espressif.com/dl/esp-idf'
+IDF_PIP_WHEELS_URL = os.environ.get('IDF_PIP_WHEELS_URL', 'https://dl.espressif.com/pypi')
 
 PYTHON_PLATFORM = platform.system() + '-' + platform.machine()
 
@@ -2488,7 +2489,7 @@ def main(argv):  # type: (list[str]) -> None
                                     action='store_true')
     install_python_env.add_argument('--extra-wheels-dir', help='Additional directories with wheels ' +
                                     'to use during installation')
-    install_python_env.add_argument('--extra-wheels-url', help='Additional URL with wheels', default='https://dl.espressif.com/pypi')
+    install_python_env.add_argument('--extra-wheels-url', help='Additional URL with wheels', default=IDF_PIP_WHEELS_URL)
     install_python_env.add_argument('--no-index', help='Work offline without retrieving wheels index')
     install_python_env.add_argument('--features', default='core', help='A comma separated list of desired features for installing.'
                                                                        ' It defaults to installing just the core funtionality.')