Skip to content

Commit

Permalink
mkbuildoptglobals.py: assert python version (#8886)
Browse files Browse the repository at this point in the history
Fix unused var causing warnings
Assert minimal supported version of python3
Python 3.7 in documentation
  • Loading branch information
mcspr committed Mar 17, 2023
1 parent 84a59aa commit 734defb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Prerequisites

- Arduino 1.6.8 (or newer, current working version is 1.8.5)
- git
- Python 3.x (https://python.org)
- Python ≥3.7 (https://python.org)
- terminal, console, or command prompt (depending on your OS)
- Internet connection
- Uninstalling any core version installed via Board Manager
Expand Down
16 changes: 11 additions & 5 deletions tools/mkbuildoptglobals.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,24 @@
"""

import argparse
from shutil import copyfile
import glob
import locale
import os
import platform
import traceback
import sys
import textwrap
import time
import traceback

from shutil import copyfile


# Stay in sync with our bundled version
PYTHON_REQUIRES = (3, 7)

if sys.version_info < PYTHON_REQUIRES:
raise SystemExit(f"{__file__}\nMinimal supported version of Python is {PYTHON_REQUIRES[0]}.{PYTHON_REQUIRES[1]}")

import locale

# Need to work on signature line used for match to avoid conflicts with
# existing embedded documentation methods.
Expand Down Expand Up @@ -682,8 +690,6 @@ def main():
if debug_enabled:
locale_dbg()

default_locale = locale.getdefaultlocale()
print_msg(f'default locale: {default_locale}')
print_msg(f'default_encoding: {default_encoding}')

print_dbg(f"runtime_ide_path: {runtime_ide_path}")
Expand Down

0 comments on commit 734defb

Please sign in to comment.