Skip to content

Conversation

brianignacio5
Copy link
Collaborator

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:

  • Added a mirror parameter to the setup flow, including functions such as installPythonEnvFromIdfTools, installPyReqs, createPyReqs, and downloadIdfTools, allowing users to specify which Python package mirror to use. [1] [2] [3] [4]
  • Set the PIP_INDEX_URL environment variable to the Espressif mirror (https://dl.espressif.cn/pypi) when the selected mirror is ESP.IdfMirror.Espressif, ensuring pip uses the correct source for package installation.

Integration of mirror selection in setup UI and store:

  • Updated the setup store and UI logic to include the selected mirror (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:

  • Passed the mirror parameter through the SetupPanel class methods and related function calls, maintaining consistency and enabling correct environment configuration. [1] [2] [3] [4]

Minor code cleanups and bug fixes:

  • Fixed a bug in the setup store where .value was missing in the Python version selection logic, ensuring the correct path is used.
  • Minor formatting and whitespace cleanups for improved readability and maintainability. [1] [2] [3]

Fixes #1688

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Click on "ESP-IDF: Configure ESP-IDF Extension" command and run the setup either Express or Advanced. Choose Espressif mirror when installing.
  2. Execute action.
  3. Observe results. During Python packages step, see that https://dl.espressif.cn/pypi is used to download python packages.
  • Expected behaviour:

When using the Espressif Mirror, the https://dl.espressif.cn/pypi is set in PIP_INDEX_URL when installing the ESP-IDF python packages.

  • Expected output:

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:

  • ESP-IDF Version: master
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@brianignacio5 brianignacio5 added this to the v1.11.0 milestone Oct 20, 2025
@brianignacio5 brianignacio5 self-assigned this Oct 20, 2025
Copy link

Download the artifacts for this pull request:
You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Set pip index-url to Espressif mirror when using the Espressif download server (VSC-1779)

1 participant