Espressif mirror now uses Espressif cn PyPI registry for python packages #1692
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces support for selecting an ESP-IDF Python package mirror during setup, enabling users to specify which mirror to use for Python requirements installation. The changes propagate the new
mirror
parameter through the setup flow, ensuring it is passed to all relevant functions and used to set the appropriate environment variable for pip. Additionally, there are minor code cleanups and bug fixes in the setup logic.Support for ESP-IDF Python package mirror selection:
mirror
parameter to the setup flow, including functions such asinstallPythonEnvFromIdfTools
,installPyReqs
,createPyReqs
, anddownloadIdfTools
, allowing users to specify which Python package mirror to use. [1] [2] [3] [4]PIP_INDEX_URL
environment variable to the Espressif mirror (https://dl.espressif.cn/pypi
) when the selected mirror isESP.IdfMirror.Espressif
, ensuring pip uses the correct source for package installation.Integration of mirror selection in setup UI and store:
selectedIdfMirror.value
) when checking ESP-IDF tools and posting setup messages, ensuring the mirror choice is respected throughout the process.Propagation of mirror parameter through setup classes and functions:
mirror
parameter through theSetupPanel
class methods and related function calls, maintaining consistency and enabling correct environment configuration. [1] [2] [3] [4]Minor code cleanups and bug fixes:
.value
was missing in the Python version selection logic, ensuring the correct path is used.Fixes #1688
Type of change
Please delete options that are not relevant.
Steps to test this pull request
Provide a list of steps to test changes in this PR and required output
https://dl.espressif.cn/pypi
is used to download python packages.When using the Espressif Mirror, the
https://dl.espressif.cn/pypi
is set in PIP_INDEX_URL when installing the ESP-IDF python packages.When using the Espressif Mirror, the
https://dl.espressif.cn/pypi
is set in PIP_INDEX_URL when installing the ESP-IDF python packages.How has this been tested?
Manual testing using steps above.
Test Configuration:
Checklist