Commit Graph

102 Commits

Author SHA1 Message Date
Frantisek Hrbata
6197d1a256 fix: ensure the constraint file is followed also for setuptools
Currently, when the venv is installed or updated, we attempt to
automatically update pip and setuptools within the venv. Unfortunately,
the setuptools package is installed or updated without adhering to the
constraints file, which restricts the setuptools version due to
https://github.com/pypa/setuptools/issues/4480. Resolve this issue by
applying the constraints file to the installation and update of both pip
and setuptools.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-02 10:10:29 +02:00
Jakub Kocka
c8f8185561 refactor(idf_tools): IDF version is acquired only from version or header file
Closes https://github.com/espressif/esp-idf/issues/13385
2024-03-20 07:59:58 +01:00
Aleksei Apaseev
d17433623d fix(idf_tools): Opt for the recommended tool in tools.json rather than the supported one (v5.0) 2023-12-12 14:19:39 +08:00
Zim Kalinowski
a205213cc8 build system: fix init.bat crash in windows when folder contains unicode characters 2023-07-10 11:34:56 +08:00
Roland Dobai
d3885faa43 Tools: Update the certificate of idf_tools.py 2023-05-25 16:30:08 +02:00
Roland Dobai
1feccdc414 Tools: Allow custom Python installation path with IDF_PYTHON_ENV_PATH
IDF_PYTHON_ENV_PATH is the path where the Python environment is created
and used. By default it is inside IDF_TOOLS_PATH. IDF_PYTHON_ENV_PATH
was exported by idf_tools.py but was not imported back. This fixes the
issue and ESP-IDF will honor the value of IDF_PYTHON_ENV_PATH.

Closes https://github.com/espressif/esp-idf/issues/10489
2023-02-15 12:15:46 +01:00
Marek Fiala
39ee8117c3 Tools: bugfix Export script offers cmake & ninja for removal on macOS 2022-12-05 15:56:08 +01:00
Roland Dobai
f7a32dbb1d Merge branch 'tools/idf_tools_use_mirror_url_v5.0' into 'release/v5.0'
tools: espidf constraints also supports mirror url (v5.0)

See merge request espressif/esp-idf!21086
2022-12-02 19:12:17 +08:00
Roland Dobai
8faf09234c Merge branch 'feature/use_tools_json_to_check_toolchain_ver_v5.0' into 'release/v5.0'
Tools: use tools.json to double-check toolchain version when building (v5.0)

See merge request espressif/esp-idf!20662
2022-12-02 19:11:54 +08:00
Roland Dobai
5ae4abe717 Merge branch 'fix/idf_tools_venv_check_v5.0' into 'release/v5.0'
Tools: Check venv the same way how it will be used later (v5.0)

See merge request espressif/esp-idf!20544
2022-12-02 19:10:33 +08:00
Roland Dobai
e08150e534 Merge branch 'fix/tools-gdbinit-with-elf-symbols_v5.0' into 'release/v5.0'
tools: fixed elf symbols load if gdbinit specified (v5.0)

See merge request espressif/esp-idf!20467
2022-12-02 19:09:48 +08:00
Roland Dobai
d1a32474b3 Merge branch 'fix/idf_tools_download_issues_v5.0' into 'release/v5.0'
Tools: Improve download error messages coming from idf_tools.py (v5.0)

See merge request espressif/esp-idf!20352
2022-12-02 19:08:33 +08:00
Roland Dobai
f1f7ac2f28 Merge branch 'bugfix/writable_idf_tools_path_v5.0' into 'release/v5.0'
Tools: Support ESP-IDF installed in system-wide shared directory for all users (v5.0)

See merge request espressif/esp-idf!20328
2022-12-02 19:07:50 +08:00
Chen Yudong
6f583ccb29 tools: idf extra wheels url can be set by environment variables 2022-11-14 19:53:34 +08:00
Chen Yudong
0dbf7f5d4c tools: support download espidf constraints files from mirror url 2022-11-14 19:53:34 +08:00
Alexey Lapshin
97353355ab tools: cmake: check tool supported version with idf_tools.py 2022-10-18 12:27:55 +04:00
Roland Dobai
bbc5009e9f Tools: Check venv the same way how it will be used later
It is possible that import of venv passes but it still cannot be
started. This can happen with the embedded Python deployed by the
ESP-IDF installer.
2022-10-11 16:26:21 +02:00
Roland Dobai
737cdcbaa6 Tools: The Python dependency checker should not update the constraint file
The Python dependency checker called from the export scripts and before
build remains offline, i.e. it will use the previously downloaded
constraint file but won't download a newer version.

Related to https://github.com/espressif/esp-idf/pull/9328
2022-10-10 09:46:39 +02:00
Alexey Lapshin
3eec946f60 tools: add esp-rom-elfs version '20220823' 2022-10-03 18:48:16 +04:00
Roland Dobai
dc9a41b562 Tools: Improve download error messages coming from idf_tools.py
Closes https://github.com/espressif/esp-idf/issues/9618
2022-09-26 14:46:23 +02:00
Marek Fiala
1e6e0cf062 Tools: Support ESP-IDF installed in system-wide shared directory for all users
Closes: https://github.com/espressif/esp-idf/issues/9329
Closes: https://github.com/espressif/esp-idf/pull/9328
2022-09-23 15:54:57 +02:00
Ivan Grokhotkov
1e841ae802
tools: update bundled root certificate in idf_tools.py
dl.espressif.com is now using the same root certificate as github.com.
This commit replaces the previously-used ISRG X1 root certificate
with the DigiCert Root CA certificate.
As a result, even if the certificates are not installed (as it happens
on macOS with python.org installers, if the user forgets to run
'Install Certificates.command'), the download is successful.

Related to https://github.com/espressif/esp-idf/issues/4081
2022-09-12 18:09:13 +02:00
Alexey Lapshin
06cdc0ee4f tools: update gdb version to '11.2_20220823'
Closes https://github.com/espressif/esp-idf/issues/6124
2022-08-29 15:41:14 +04:00
Roland Dobai
ccdeb43cc7 Merge branch 'fix/flake8_v5_warnings_v5.0' into 'release/v5.0'
Tools: Fix flake8 version 5 warnings (v5.0)

See merge request espressif/esp-idf!19543
2022-08-14 02:51:36 +08:00
Roland Dobai
1ae3768321 Tools: Fix flake8 version 5 warnings 2022-08-12 15:36:11 +02:00
Roland Dobai
a200091546 Tools: Upgrade pip and setuptools if venv is not able
venv upgrades pip and setuptools by the --upgrade-deps option available
since Python 3.9. This commit adds manual upgrade for Pythons 3.7 and 3.8.
2022-08-11 16:15:16 +02:00
Roland Dobai
de37f9dc33 Tools: Disable Python constraint files with environment variable
Constraint files can be disabled with environment variable as well which
is useful when one uses the install/export scripts instead of
idf_tools.py directly. This is option is useful for offline build as
well.

Closes https://github.com/espressif/esp-idf/issues/9263
2022-07-14 11:25:29 +02:00
Marek Fiala
90a69c4490 Tools: --disable-* argument for removing features
Optional argument --disable-* for removing features in install scripts.
2022-06-30 12:31:59 +02:00
Roland Dobai
ed795c86df Tools: Use built-in venv instead of virtualenv for creating Python environments 2022-05-28 06:43:14 +00:00
Alexey Lapshin
0afd70c362 Tools: fix architecture armhf/armel detection 2022-05-18 15:18:09 +04:00
Alexey Lapshin
e49d4a83d9 tools: Add tool's versions update with checksum file
'idf_tools.py add-version' has new options:
--override            Override tool versions with new data
--checksum-file       URL or path to local file with checksum/size for artifacts

Usage e.g.:
CHECKSUM_URL=https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/crosstool-NG-esp-2021r2-checksum.sha256
idf_tools.py add-version --tool xtensa-esp32-elf --version esp-2021r2 --override --checksum-file $CHECKSUM_URL

Positional argument 'files' moved to optional argument '--artifact-file'

Add tests for add-version logic
2022-05-13 06:51:59 +00:00
Marek Fiala
0bf264a948 tools: bugfix - broken export script while working with esp-idf file
+ bugfix IDF_PATH detection in sh and dash shells.
+ created Classes that represents idf-env.json file
2022-04-24 22:29:18 +02:00
Anton Maklakov
3f3d6c84d7 tools: print system platform 2022-04-15 13:37:27 +02:00
Erhan Kurubas
b36e9a5ebf tools: add distro links for macos-arm64 2022-04-15 13:37:27 +02:00
Roland Dobai
4520fee875 Tools: IDF_TOOLS_PATH environment variable should change the constraint file path 2022-04-14 11:08:20 +02:00
Roland Dobai
c3c2b03ed4 Tools: idf_tools.py prints URL before starting the download
This helps users with poor Internet connection to be able to cancel the
download and download it in another way.

Closes https://github.com/espressif/esp-idf/issues/8625
2022-03-30 11:13:16 +02:00
Marek Fiala
029de43db3 tools: bugfix export.sh change IDF_PATH only if file is esp-idf
Set the self_path where the export.sh script is located, not the sourcing directory.
2022-03-15 11:24:09 +01:00
Marek Fiala
df16a45d7a tools: Switching between ESP-IDF versions
Support switching between ESP-IDF versions on UNIX systems.
2022-03-11 12:57:25 +01:00
Roland Dobai
d1ae1450c9 Merge branch 'feature/remove_unused_tools' into 'master'
tools: Remove tools that are not used by active ESP-IDF version.

Closes IDF-2054

See merge request espressif/esp-idf!16586
2022-02-24 06:29:34 +00:00
Marek Fiala
a4b0560014 tools: Remove tools that are not used by active ESP-IDF version.
Or remove unused archives from tools - older version, or unused tool archive
2022-02-20 19:48:50 +01:00
Roland Dobai
d93380e8f6 Tools: Don't print git failure message for version detection 2022-02-16 18:47:08 +01:00
Roland Dobai
9027c30237 Merge branch 'feat/python_reqs_directory' into 'master'
Tools: Make easier the detection of the list of Python features

See merge request espressif/esp-idf!17009
2022-02-14 16:06:36 +00:00
Roland Dobai
39fd59f2c0 Tools: Use delay between rename attempts on Windows in the installer 2022-02-07 17:18:37 +01:00
Roland Dobai
fddc73759e Tools: Make easier the detection of the list of Python features 2022-02-03 19:02:14 +01:00
Roland Dobai
1a9398799c Tools: Download the Python constraint file less frequently 2022-01-18 14:55:53 +01:00
Roland Dobai
b28d7e6850 Tools: Improve the Python package system
Introduce features into the Python package management system & manage
package versions outside of ESP-IDF repo.
2022-01-17 16:54:36 +01:00
Ivan Grokhotkov
e857b260a5 tools: improve virtualenv diagnostics, set python path explicitly
- Check if pip is installed for sys.executable before attempting to
  create the virtual environment, bail out with an error if not.
- Don't pass --seeder argument to virtualenv if its version is
  too old. For example, on Ubuntu 18.04, virtualenv 15.1.0 doesn't
  support this argument.
- Pass --python argument to virtualenv to request specific interpreter
  to be used.

Closes https://github.com/espressif/esp-idf/issues/8045
2022-01-05 09:55:13 +01:00
Juraj Sadel
7458d52945 tools: Add check for PIP_USER variable
Closes https://github.com/espressif/esp-idf/issues/7910
2021-12-08 17:36:58 +08:00
Ivan Grokhotkov
ede3dc3ea4 tools: fix some type annotations in idf_tools.py 2021-12-01 20:03:53 +01:00
Ivan Grokhotkov
d835387924 tools: make idf_tools.py download --platform argument optional
...as it is described in the docs.
2021-12-01 20:02:19 +01:00