diff --git a/HISTORY.rst b/HISTORY.rst index 7f86e40f..17a8786b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -46,20 +46,26 @@ PlatformIO Core 4 - Command launcher with own arguments - Launch command with custom options declared in `"platformio.ini" `__ - Python callback as a target (use the power of Python interpreter and PlatformIO Build API) + - List available project targets (including dev-platform specific and custom targets) with a new `platformio run --list-targets `__ command (`issue #3544 `_) -* Display system-wide information using a new `platformio system info `__ command (`issue #3521 `_) -* List available project targets (including dev-platform specific and custom targets) with a new `platformio run --list-targets `__ command (`issue #3544 `_) -* Added support for "globstar/`**`" (recursive) pattern for the different commands and configuration options (`platformio ci `__, `src_filter `__, `check_patterns `__, `library.json > srcFilter `__). Python 3.5+ is required. -* Added a new ``-e, --environment`` option to `platformio project init `__ command that helps to update a PlatformIO project using existing environment -* Dump data intended for IDE extensions/plugins using a new `platformio project idedata `__ command -* Do not generate ".travis.yml" for a new project, let the user have a choice -* Automatically enable LDF dependency `chain+ mode (evaluates C/C++ Preprocessor conditional syntax) `__ for Arduino library when "library.property" has "depends" field (`issue #3607 `_) -* Enable "cyclic reference" for GCC linker only for the embedded dev-platforms (`issue #3570 `_) -* Updated PIO Unit Testing support for Mbed framework. Added compatibility with Mbed OS 6 -* Do not escape compiler arguments in VSCode template on Windows -* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 `_) -* Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 `_) -* Fixed an issue with ``clean`` target on Windows when project and build directories are located on different logical drives (`issue #3542 `_) +* **PlatformIO Build System** + + - Upgraded to `SCons 4.0 - a next-generation software construction tool `__ + - Enable "cyclic reference" for GCC linker only for the embedded dev-platforms (`issue #3570 `_) + - Automatically enable LDF dependency `chain+ mode (evaluates C/C++ Preprocessor conditional syntax) `__ for Arduino library when "library.property" has "depends" field (`issue #3607 `_) + - Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 `_) + - Fixed an issue with ``clean`` target on Windows when project and build directories are located on different logical drives (`issue #3542 `_) + +* **Miscellaneous** + + - Display system-wide information using a new `platformio system info `__ command (`issue #3521 `_) + - Dump data intended for IDE extensions/plugins using a new `platformio project idedata `__ command + - Added a new ``-e, --environment`` option to `platformio project init `__ command that helps to update a PlatformIO project using existing environment + - Added support for "globstar/`**`" (recursive) pattern for the different commands and configuration options (`platformio ci `__, `src_filter `__, `check_patterns `__, `library.json > srcFilter `__). Python 3.5+ is required. + - Do not generate ".travis.yml" for a new project, let the user have a choice + - Updated PIO Unit Testing support for Mbed framework. Added compatibility with Mbed OS 6 + - Do not escape compiler arguments in VSCode template on Windows + - Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 `_) 4.3.4 (2020-05-23) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 3ecfb596..b51a0be0 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -49,7 +49,7 @@ __core_packages__ = { "contrib-piohome": "~3.2.3", "contrib-pysite": "~2.%d%d.0" % (sys.version_info.major, sys.version_info.minor), "tool-unity": "~1.20500.0", - "tool-scons": "~2.20501.7" if sys.version_info.major == 2 else "~3.30102.0", + "tool-scons": "~2.20501.7" if sys.version_info.major == 2 else "~4.40001.0", "tool-cppcheck": "~1.190.0", "tool-clangtidy": "~1.100000.0", "tool-pvs-studio": "~7.7.0", diff --git a/platformio/platform/_run.py b/platformio/platform/_run.py index 38cf232c..457983c4 100644 --- a/platformio/platform/_run.py +++ b/platformio/platform/_run.py @@ -20,7 +20,7 @@ import sys import click from platformio import app, fs, proc, telemetry -from platformio.compat import hashlib_encode_data, is_bytes +from platformio.compat import PY2, hashlib_encode_data, is_bytes from platformio.package.manager.core import get_core_package_dir from platformio.platform.exception import BuildScriptNotFound @@ -89,9 +89,15 @@ class PlatformRunMixin(object): telemetry.send_run_environment(topts, targets) def _run_scons(self, variables, targets, jobs): + scons_dir = get_core_package_dir("tool-scons") + script_path = ( + os.path.join(scons_dir, "script", "scons") + if PY2 + else os.path.join(scons_dir, "scons.py") + ) args = [ proc.get_pythonexe_path(), - os.path.join(get_core_package_dir("tool-scons"), "script", "scons"), + script_path, "-Q", "--warn=no-no-parallel-support", "--jobs",