Commit Graph

64 Commits

Author SHA1 Message Date
Marek Fiala
640f1c844b Tools: bugfix wrong format of idf-env.json, KeyError: 'idfSelectedId'
Closes https://github.com/espressif/esp-idf/issues/9837
2022-09-26 13:36:16 +02:00
Alexey Lapshin
65da9400e8 tools: fix idf_tools.py download command without --platform option 2022-09-15 12:55:41 +04:00
Ivan Grokhotkov
3301606cdf
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:24 +02:00
Anton Maklakov
722282e30b tools: add standard triplets for macos 2022-09-08 11:17:02 +07:00
Alexey Lapshin
1edf376060 Tools: fix architecture armhf/armel detection 2022-09-08 11:17:02 +07:00
Alexey Lapshin
7d010d36c8 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-09-08 11:17:02 +07:00
Anton Maklakov
a3ab8da720 tools: just extract download() method 2022-09-08 10:34:17 +07:00
Roland Dobai
f935c17a95 Tools: Fix Python style warnings 2022-08-09 14:30:52 +02:00
Roland Dobai
7b33262d26 Tools: Don't use f-string in idf_tools.py
ESP-IDF v4.4 supports Python 3.6 or newer. F-strings are available there
but idf_tools.py can fail if run with older Pythons because the Python
version check is done later.

Closes https://github.com/espressif/esp-idf/issues/8890
2022-05-04 12:01:49 +02:00
Anton Maklakov
e72017bb23 tools: print system platform 2022-04-27 08:58:32 +02:00
Erhan Kurubas
6ae22d9f3b tools: add distro links for macos-arm64 2022-04-27 08:56:33 +02:00
Roland Dobai
18da1180ad Tools: Use delay between rename attempts on Windows in the installer 2022-02-08 11:06:14 +01:00
Ivan Grokhotkov
2e3f4ff6dd 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-16 21:45:30 +01:00
Juraj Sadel
1e39970e91 tools: Add check for PIP_USER variable
Closes https://github.com/espressif/esp-idf/issues/7910
2021-12-08 16:25:17 +01:00
Alexey Gerenkov
37dc255bc4 idf_tools: Adds 'linux-armhf' platform support 2021-11-17 23:27:45 +03:00
Roland Dobai
2cdf90f810 tools: Create the ".espressif" directory on the first run on clean system
Closes https://github.com/espressif/esp-idf/issues/7848
2021-11-09 12:02:50 +01:00
Juraj Sadel
600f3b89a2 tools/idf_tools.py: Changed default AppData seeder to seeder pip 2021-09-17 15:36:44 +02:00
Ivan Grokhotkov
57a32a8615 tools: idf_tools.py: add support for .tar.xz archives 2021-09-10 13:24:02 +02:00
Martin Gaňo
f25ed8bbdf Tools: Fixed typo in idf_tools.py 2021-07-28 16:43:02 +08:00
Roland Dobai
e1c978a03b Merge branch 'feature/use_lin_bin_on_freebsd' into 'master'
Tools: Use Linux i386/AMD64 binaries on FreeBSD

Closes IDFGH-5492

See merge request espressif/esp-idf!14442
2021-07-22 14:31:20 +00:00
Marek Fiala
f6c2198a21 tools: Installing tools for given IDF_TARGET
Allow user to select specific ESP_TARGET while setting up ESD_IDF.
Only necessary tools for given target will be downloaded and installed.

Closes https://github.com/espressif/esp-idf/issues/5113
2021-07-16 15:03:19 +02:00
Tomasz 'CeDeROM' CEDRO
05f0fa6ebd Use Linux i386/AMD64 binaries on FreeBSD.
FreeBSD can natively emulate Linux ELF binaries.
This commit allows automated Linux tools deployment on FreeBSD.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2021-07-02 16:08:49 +02:00
Roland Dobai
a71a74cd9d tools: Catch OSError which is raised when the tool is not available
Closes https://github.com/espressif/esp-idf/issues/7140
2021-06-23 11:48:45 +02:00
Roland Dobai
407053592e Drop support for unsupported Python versions 2021-06-21 21:48:49 +02:00
Marek Fiala
ae6f602b6b tools: Warning about tool beiing installed but failed to run.
idf_tool.py runs "<tool> --version" which returns the error message but it is not used
This improves the error printing.
2021-04-12 20:51:32 +02:00
Roland Dobai
49360cb401 tools: Reinstall virtualenv if it is broken
Closes https://github.com/espressif/esp-idf/issues/6656
2021-03-08 10:20:33 +01:00
Roland Dobai
191c4ccc01 tools: Add Python typing annotations for idf_tools.py 2021-03-08 10:20:33 +01:00
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
Ivan Grokhotkov
19d2e4cca1 Merge branch 'bugfix/idf_tools_py_splittype_deprecation' into 'master'
idf_tools.py: avoid splittype call deprecated in python3.8

Closes IDFGH-4364

See merge request espressif/esp-idf!11956
2021-01-20 07:24:36 +08:00
Juraj Michálek
f814a4dc02 fix: tools detection of wheels dir 2021-01-18 17:26:20 +01:00
Ivan Grokhotkov
76acc8ddde Merge branch 'feature/win_inst_embedded_python' into 'master'
tools: support for embedded Python

Closes IDF-322

See merge request espressif/esp-idf!11682
2021-01-18 16:54:47 +08:00
Juraj Michálek
1427b3a6d8 tools: support for embedded python 2021-01-18 08:10:56 +01:00
Sergei Silnov
c305ceb55f idf_tools.py: avoid splittype call deprecated in python3.8
Closes https://github.com/espressif/esp-idf/issues/6200
2021-01-11 17:45:29 +01:00
Ivan Grokhotkov
5739127412 tools: idf_tools.py: allow macOS x86_64 tools to be installed on arm64
Until arm64 tool binaries are available, we can run existing x86_64
ones under emulation.

Suggested in https://github.com/espressif/esp-idf/issues/6113.
2021-01-07 21:21:18 +01:00
Ivan Grokhotkov
46cfc436ad Merge branch 'feature/idf_tools_github_mirror' into 'master'
Add GitHub mirror option for IDF tools installs

Closes IDF-2028

See merge request espressif/esp-idf!10616
2020-12-14 15:58:51 +08:00
Angus Gratton
94fe736bc5 tools: Avoid subprocess.run(capture_output) argument for Python <3.7 compatibility
In Python 3.5 and 3.6 the equivalent to capture_output=True is to set stdout
and stderr arguments to subprocess.PIPE
2020-12-07 15:01:10 +11:00
Angus Gratton
4a738721f1 idf_tools: Add option to replace all GitHub tools download URLs with dl.espressif.com
Via new IDF_GITHUB_ASSETS environment variable.
2020-12-03 17:49:37 +11:00
Ivan Grokhotkov
d9db49d9f7 tools: idf_tools.py: fix compatibility with Python <= 2.7.8
Multiple ssl-related features have been backported from Python 3.x
to Python 2.7.9. This adds a fallback so that idf_tools.py can work
on older versions.
2020-10-14 20:19:32 +02:00
Ivan Grokhotkov
e43a4d51f2 tools: fix idf_tools.py compatibility regression with Python 2
In Python 2, cadata must be explicitly converted to unicode:
https://bugs.python.org/issue37079

Regression from 081ebcf1e7
2020-10-14 18:24:55 +02:00
Ivan Grokhotkov
fcb80c3cd6 Merge branch 'bugfix/idf_tools_letsencrypt_cert' into 'master'
add letsencrypt root cert into idf_tools.py

See merge request espressif/esp-idf!8829
2020-10-14 19:54:52 +08:00
Angus Gratton
261363855c build system: Also get IDF version from annotated tags only
Builds on previous commit.

Note: Getting the project version still pases --tags so still works with plain
tags, to keep compatibility for existing projects
2020-10-07 09:36:40 +11:00
Ivan Grokhotkov
081ebcf1e7 tools: add dl.espressif.com root cert into idf_tools.py
Closes https://github.com/espressif/esp-idf/issues/5842
2020-09-18 17:39:53 +02:00
Felipe Neves
674a070a0d idf_tools: adds .tgz as alowed extension 2020-06-08 10:34:05 -03:00
Ivan Grokhotkov
5d399b459c tools: check if idf_tools.py install-python-env is called from a venv
Closes IDF-1095
2020-02-26 14:03:38 +01:00
Ivan Grokhotkov
7a18f02acd idf_tools.py: fix install-python-env failure with virtualenv 20.0.0
--no-site-packages is the default behavior since virtualenv 1.7
(released in Nov 2011). This option was removed in virtualenv 20.0.
2020-02-10 19:14:41 +01:00
Ivan Grokhotkov
1cd6f67679 docs: add API guide page about IDF Tools 2020-01-24 14:02:21 +01:00
Ivan Grokhotkov
9746dbe643 idf_tools.py: fix typo in __PYVENV_LAUNCHER__ env variable name
Fixes the workaround added in 9279b72a6.
2020-01-21 10:48:24 +01:00
Ivan Grokhotkov
86e5bea50d Merge branch 'bugfix/server_down_message' into 'master'
tools: Produce user friendly error during install when the server is down

Closes IDFGH-2175

See merge request espressif/esp-idf!6718
2019-12-09 22:48:32 +08:00
Angus Gratton
0d5056f683 Merge branch 'bugfix/idf_tool_git_worktree' into 'master'
tools: Don't use git work-tree in idf_tools.py and try to parse IDF version from C header

Closes IDFGH-2203

See merge request espressif/esp-idf!6743
2019-11-26 13:57:12 +08:00
Anton Maklakov
0ed38ca24d idf_tools.py: fix downloading for tools which have "on_request" options for some platforms.
'install' and 'download' options can be used for 'required' or 'all' tools
2019-11-24 19:11:33 +08:00