From b41262a20e11a3b1cee88d62db49a0acd925d09f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Feb 2020 16:34:38 +0200 Subject: [PATCH 1/2] Fix broken "init" command --- platformio/__main__.py | 9 --------- platformio/commands/__init__.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/platformio/__main__.py b/platformio/__main__.py index 4358e4fe..6679d52e 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -91,21 +91,12 @@ def configure(): click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs) -def remap_command_arguments(argv): - if len(argv) > 1 and argv[1] == "init": - return argv[:1] + ["project"] + argv[1:] - return argv - - def main(argv=None): exit_code = 0 prev_sys_argv = sys.argv[:] if argv: assert isinstance(argv, list) sys.argv = argv - else: - sys.argv = remap_command_arguments(sys.argv) - try: configure() cli() # pylint: disable=no-value-for-parameter diff --git a/platformio/commands/__init__.py b/platformio/commands/__init__.py index bc018f8c..f6bac830 100644 --- a/platformio/commands/__init__.py +++ b/platformio/commands/__init__.py @@ -63,5 +63,18 @@ class PlatformioCLI(click.MultiCommand): mod_path = "platformio.commands.%s.command" % cmd_name mod = __import__(mod_path, None, None, ["cli"]) except ImportError: + try: + return self._handle_obsolate_command(cmd_name) + except AttributeError: + pass raise click.UsageError('No such command "%s"' % cmd_name, ctx) return mod.cli + + @staticmethod + def _handle_obsolate_command(name): + # pylint: disable=import-outside-toplevel + if name == "init": + from platformio.commands.project import project_init + + return project_init + raise AttributeError() From 176cf17f9f70800ca68ef03054f2d6f36af05ebd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Feb 2020 16:42:06 +0200 Subject: [PATCH 2/2] Bump version to 4.2.0 --- HISTORY.rst | 4 ++-- README.rst | 8 ++++++-- docs | 2 +- platformio/__init__.py | 2 +- platformio/managers/core.py | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 8a79182c..e1423599 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,10 +6,10 @@ Release Notes PlatformIO Core 4.0 ------------------- -4.2.0 (2020-02-??) +4.2.0 (2020-02-12) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO Home 3.0 `__: +* `PlatformIO Home 3.1 `__: - Project Manager - Project Configuration UI for `"platformio.ini" `__ diff --git a/README.rst b/README.rst index 03fd04c6..992b7c0c 100644 --- a/README.rst +++ b/README.rst @@ -92,6 +92,7 @@ Development Platforms * `Microchip PIC32 `_ * `Nordic nRF51 `_ * `Nordic nRF52 `_ +* `Nuclei `_ * `NXP LPC `_ * `RISC-V `_ * `RISC-V GAP `_ @@ -109,14 +110,16 @@ Frameworks * `Arduino `_ * `CMSIS `_ -* `Energia `_ * `ESP-IDF `_ * `ESP8266 Non-OS SDK `_ * `ESP8266 RTOS SDK `_ * `Freedom E SDK `_ +* `GigaDevice GD32V SDK `_ * `Kendryte Standalone SDK `_ +* `Kendryte FreeRTOS SDK `_ * `libOpenCM3 `_ -* `mbed `_ +* `Mbed `_ +* `Nuclei SDK `_ * `PULP OS `_ * `Pumbaa `_ * `Shakti SDK `_ @@ -124,6 +127,7 @@ Frameworks * `SPL `_ * `STM32Cube `_ * `WiringPi `_ +* `Zephyr `_ Contributing ------------ diff --git a/docs b/docs index 8120b0ee..dc25f117 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8120b0eea0416657ca6213359800957ba8e72bba +Subproject commit dc25f117fd3b3acceed43ebae225e5b4a9f20105 diff --git a/platformio/__init__.py b/platformio/__init__.py index c77314ae..208873da 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (4, 2, "0rc2") +VERSION = (4, 2, 0) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 648ec9c3..c7203eca 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -24,7 +24,7 @@ from platformio.proc import copy_pythonpath_to_osenv, get_pythonexe_path from platformio.project.config import ProjectConfig CORE_PACKAGES = { - "contrib-piohome": ">=3.1.0-rc.3,<3.2.0", + "contrib-piohome": "~3.1.0", "contrib-pysite": "~2.%d%d.0" % (sys.version_info[0], sys.version_info[1]), "tool-pioplus": "^2.6.1", "tool-unity": "~1.20500.0",