kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/idf_pyserial_error' into 'master'
idf.py: Import from pyserial after packages have been checked See merge request idf/esp-idf!3519pull/2440/head
commit
76fcee55a6
|
@ -68,7 +68,9 @@ if __name__ == "__main__":
|
||||||
print('The following Python requirements are not satisfied:')
|
print('The following Python requirements are not satisfied:')
|
||||||
for requirement in not_satisfied:
|
for requirement in not_satisfied:
|
||||||
print(requirement)
|
print(requirement)
|
||||||
print('Please run "{} -m pip install --user -r {}" for resolving the issue.'.format(sys.executable, args.requirements))
|
print('Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required '
|
||||||
|
'packages. Alternatively, you can run "{} -m pip install --user -r {}" for resolving the issue.'
|
||||||
|
''.format(sys.executable, args.requirements))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print('Python requirements from {} are satisfied.'.format(args.requirements))
|
print('Python requirements from {} are satisfied.'.format(args.requirements))
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Note: we don't check for Python build-time dependencies until
|
# WARNING: we don't check for Python build-time dependencies until
|
||||||
# check_environment() function below. If possible, avoid importing
|
# check_environment() function below. If possible, avoid importing
|
||||||
# any external libraries here - put in external script, or import in
|
# any external libraries here - put in external script, or import in
|
||||||
# their specific function instead.
|
# their specific function instead.
|
||||||
|
@ -35,7 +35,6 @@ import multiprocessing
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import json
|
import json
|
||||||
import serial.tools.list_ports
|
|
||||||
|
|
||||||
class FatalError(RuntimeError):
|
class FatalError(RuntimeError):
|
||||||
"""
|
"""
|
||||||
|
@ -419,6 +418,9 @@ def get_default_serial_port():
|
||||||
|
|
||||||
Same logic as esptool.py search order, reverse sort by name and choose the first port.
|
Same logic as esptool.py search order, reverse sort by name and choose the first port.
|
||||||
"""
|
"""
|
||||||
|
# Import is done here in order to move it after the check_environment() ensured that pyserial has been installed
|
||||||
|
import serial.tools.list_ports
|
||||||
|
|
||||||
ports = list(reversed(sorted(
|
ports = list(reversed(sorted(
|
||||||
p.device for p in serial.tools.list_ports.comports() )))
|
p.device for p in serial.tools.list_ports.comports() )))
|
||||||
try:
|
try:
|
||||||
|
|
Ładowanie…
Reference in New Issue