From 4b55767fb9bc33514c06738e74eb993f0e08dd62 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 21:01:13 +0200 Subject: [PATCH 01/22] Docs: "Custom Build Task" for VSCode --- HISTORY.rst | 2 +- docs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 6f0b02f1..a55333dd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,7 +7,7 @@ PlatformIO 3.0 3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ -* Ignore *.asm and *.ASM files when building Arduino-based library (compatibility with Arduino builder) +* Ignore ``*.asm`` and ``*.ASM`` files when building Arduino-based library (compatibility with Arduino builder) * Fixed spurious project's "Problems" for `PlatformIO IDE for VSCode `__ when ARM mbed framework is used * Fixed an issue with a broken headers list when generating ".clang_complete" for `Emacs `__ (`issue #1960 `_) diff --git a/docs b/docs index c0dc8357..98e637ee 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c0dc83570a14489da4e887215b08035a503b9d95 +Subproject commit 98e637ee7697e6a8ab5ba2dd5fd83a841e00da36 From 3748219cacded29847371952dd5a4435df99526d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 21:46:28 +0200 Subject: [PATCH 02/22] Document system PATH for a custom VSCode task --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 98e637ee..ded2dba2 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 98e637ee7697e6a8ab5ba2dd5fd83a841e00da36 +Subproject commit ded2dba2ba2f16eac063017140d9c35cb8f0cefd From 9f4dde4b5ea99ed25ec0dc530039bf84b800dd86 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 13 Dec 2018 17:24:08 +0200 Subject: [PATCH 03/22] Use full path to PlatformIO CLI when generate project for IDE --- platformio/ide/projectgenerator.py | 4 +- .../platformio.sublime-project.tpl | 66 +++++++++++-------- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index efec49ad..8ec43aed 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -15,6 +15,7 @@ import json import os import re +import sys from os.path import abspath, basename, expanduser, isdir, isfile, join, relpath import bottle @@ -146,7 +147,8 @@ class ProjectGenerator(object): "project_libdeps_dir": util.get_projectlibdeps_dir(), "systype": util.get_systype(), "platformio_path": self._fix_os_path( - util.where_is_program("platformio")), + sys.argv[0] if isfile(sys.argv[0]) + else util.where_is_program("platformio")), "env_pathsep": os.pathsep, "env_path": self._fix_os_path(os.getenv("PATH")) }) # yapf: disable diff --git a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl index 6f24d6a1..160cd6ba 100644 --- a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl +++ b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl @@ -4,7 +4,7 @@ { "cmd": [ - "platformio", + "{{ platformio_path }}", "-f", "-c", "sublimetext", "run" ], @@ -14,7 +14,7 @@ { "cmd": [ - "platformio", + "{{ platformio_path }}", "-f", "-c", "sublimetext", "run" ], @@ -23,27 +23,7 @@ { "cmd": [ - "platformio", - "-f", "-c", "sublimetext", - "run", - "--target", - "clean" - ], - "name": "Clean" - }, - { - "cmd": - [ - "platformio", - "-f", "-c", "sublimetext", - "test" - ], - "name": "Test" - }, - { - "cmd": - [ - "platformio", + "{{ platformio_path }}", "-f", "-c", "sublimetext", "run", "--target", @@ -54,7 +34,27 @@ { "cmd": [ - "platformio", + "{{ platformio_path }}", + "-f", "-c", "sublimetext", + "run", + "--target", + "clean" + ], + "name": "Clean" + }, + { + "cmd": + [ + "{{ platformio_path }}", + "-f", "-c", "sublimetext", + "test" + ], + "name": "Test" + }, + { + "cmd": + [ + "{{ platformio_path }}", "-f", "-c", "sublimetext", "run", "--target", @@ -65,7 +65,7 @@ { "cmd": [ - "platformio", + "{{ platformio_path }}", "-f", "-c", "sublimetext", "run", "--target", @@ -76,16 +76,24 @@ { "cmd": [ - "platformio", + "{{ platformio_path }}", "-f", "-c", "sublimetext", "update" ], "name": "Update platforms and libraries" + }, + { + "cmd": + [ + "{{ platformio_path }}", + "-f", "-c", "sublimetext", + "upgrade" + ], + "name": "Upgrade PlatformIO Core" } ], "working_dir": "${project_path:${folder}}", - "selector": "source.c, source.c++", - "path": "{{env_path}}" + "selector": "source.c, source.c++" } ], "folders": @@ -98,7 +106,7 @@ { "sublimegdb_workingdir": "{{project_dir}}", "sublimegdb_exec_cmd": "", - "sublimegdb_commandline": "{{platformio_path}} -f -c sublimetext debug --interface=gdb --interpreter=mi -x .pioinit" + "sublimegdb_commandline": "{{ platformio_path }} -f -c sublimetext debug --interface=gdb --interpreter=mi -x .pioinit" } } From 4dfa885a85d8d0f0216099bfccbeffca4b57a705 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 13 Dec 2018 17:30:10 +0200 Subject: [PATCH 04/22] CLion: Improve project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of full path --- HISTORY.rst | 10 +++++- .../ide/tpls/clion/CMakeListsPrivate.txt.tpl | 32 +++++++++++-------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a55333dd..1c43db1c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,15 @@ Release Notes PlatformIO 3.0 -------------- +3.6.4 (2018-??-??) +~~~~~~~~~~~~~~~~~~ + +* Improved Project Generator for IDEs: + + - Use full path to PlatformIO CLI when generating a project + (`issue #1674 `_) + - CLion: Improved project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of full path + 3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ @@ -50,7 +59,6 @@ PlatformIO 3.0 (`issue #1873 `_) * Fixed an issue with incorrect handling of a custom package name when using `platformio lib install `__ or `platformio platform install `__ commands - 3.6.0 (2018-08-06) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl index 3c4bed47..65423e22 100644 --- a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl @@ -1,8 +1,20 @@ -set(ENV{PATH} "{{env_path}}") -set(PLATFORMIO_CMD "{{platformio_path}}") +% def _normalize_path(path): +% if user_home_dir in path: +% if "windows" in systype: +% path = path.replace(user_home_dir, "$ENV{HOMEDRIVE}$ENV{HOMEPATH}") +% else: +% path = path.replace(user_home_dir, "$ENV{HOME}") +% end +% elif project_dir in path: +% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}") +% end +% return path.replace("\\", "/") +% end -SET(CMAKE_C_COMPILER "{{cc_path.replace("\\", "/")}}") -SET(CMAKE_CXX_COMPILER "{{cxx_path.replace("\\", "/")}}") +set(PLATFORMIO_CMD "{{ _normalize_path(platformio_path) }}") + +SET(CMAKE_C_COMPILER "{{ _normalize_path(cc_path) }}") +SET(CMAKE_CXX_COMPILER "{{ _normalize_path(cxx_path) }}") SET(CMAKE_CXX_FLAGS_DISTRIBUTION "{{cxx_flags}}") SET(CMAKE_C_FLAGS_DISTRIBUTION "{{cc_flags}}") set(CMAKE_CXX_STANDARD 11) @@ -13,15 +25,7 @@ add_definitions(-D'{{!re.sub(r"([\"\(\)#])", r"\\\1", define)}}') % end % for include in includes: -% if include.startswith(user_home_dir): -% if "windows" in systype: -include_directories("$ENV{HOMEDRIVE}$ENV{HOMEPATH}{{include.replace(user_home_dir, '').replace("\\", "/")}}") -% else: -include_directories("$ENV{HOME}{{include.replace(user_home_dir, '').replace("\\", "/")}}") -% end -% else: -include_directories("{{include.replace("\\", "/")}}") -% end +include_directories("{{ _normalize_path(include) }}") % end -FILE(GLOB_RECURSE SRC_LIST "{{project_src_dir.replace("\\", "/")}}/*.*" "{{project_lib_dir.replace("\\", "/")}}/*.*" "{{project_libdeps_dir.replace("\\", "/")}}/*.*") +FILE(GLOB_RECURSE SRC_LIST "{{ _normalize_path(project_src_dir) }}/*.*" "{{ _normalize_path(project_lib_dir) }}/*.*" "{{ _normalize_path(project_libdeps_dir) }}/*.*") From 826418a443d825ccca3d374a12f0104921f4e79a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 13 Dec 2018 17:30:49 +0200 Subject: [PATCH 05/22] Bump version to 3.6.4b1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 3f6bf3af..07fa8a5d 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, 3) +VERSION = (3, 6, "4b1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From c3702391ead0155ed1a0b636cf4a3c19ae6fb064 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 13 Dec 2018 20:45:35 +0200 Subject: [PATCH 06/22] Docs: Add RISC-V ASM Video Tutorial --- docs | 2 +- examples | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index ded2dba2..214b6cda 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ded2dba2ba2f16eac063017140d9c35cb8f0cefd +Subproject commit 214b6cdaa0ad7b19595c50d2109457d838d418f5 diff --git a/examples b/examples index 322e1f2b..99f177e5 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 322e1f2bb79c42ea55a07900c97b70bfd5a7a62f +Subproject commit 99f177e5be7c595ac99167fd7b302ea117d64b42 From 579de32d4e16c51379344cf0d6b9d7807ccf59ec Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 14 Dec 2018 18:38:41 +0200 Subject: [PATCH 07/22] Docs: Remove examples with ESP8266 LD scripts, they can change --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 214b6cda..925dd823 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 214b6cdaa0ad7b19595c50d2109457d838d418f5 +Subproject commit 925dd823b1bc2fc24774fee25ed2b42a5fe0c321 From 9334f31ff28c1bb91004c3abb82952f8d8bf5670 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Dec 2018 20:51:34 +0200 Subject: [PATCH 08/22] Docs: Sync boards --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 925dd823..4cb11969 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 925dd823b1bc2fc24774fee25ed2b42a5fe0c321 +Subproject commit 4cb11969cfb3322ba4b19610a0c9fe16ddee2a84 From 7f697961ec9d69341931390b770be11759f33d3d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 21 Dec 2018 17:26:13 +0200 Subject: [PATCH 09/22] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 4cb11969..a48c700b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4cb11969cfb3322ba4b19610a0c9fe16ddee2a84 +Subproject commit a48c700ba11faa1da891ddeab613192c768252a9 From fabaadec60f99aac3882ea2fe5884e626ed8bfdc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 22 Dec 2018 22:30:23 +0200 Subject: [PATCH 10/22] Fix an issue with incorrect detecting of compatibility (LDF) between generic library and Arduino or ARM mbed frameworks --- HISTORY.rst | 2 ++ platformio/builder/tools/piolib.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 1c43db1c..651451d4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,8 @@ PlatformIO 3.0 (`issue #1674 `_) - CLion: Improved project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of full path +* Fixed an issue with incorrect detecting of compatibility (LDF) between generic library and Arduino or ARM mbed frameworks + 3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 9259a8ac..17cefb0c 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -19,6 +19,7 @@ from __future__ import absolute_import import hashlib import os +import re import sys from glob import glob from os.path import (basename, commonprefix, dirname, isdir, isfile, join, @@ -64,6 +65,9 @@ class LibBuilderFactory(object): if isfile(join(path, "module.json")): return ["mbed"] + include_re = re.compile( + r'^#include\s+(<|")(Arduino|mbed)\.h(<|")', flags=re.MULTILINE) + # check source files for root, _, files in os.walk(path, followlinks=True): for fname in files: @@ -72,9 +76,9 @@ class LibBuilderFactory(object): continue with open(join(root, fname)) as f: content = f.read() - if "Arduino.h" in content: + if "Arduino.h" in content and include_re.search(content): return ["arduino"] - elif "mbed.h" in content: + elif "mbed.h" in content and include_re.search(content): return ["mbed"] return [] From 68e3f9dc00056acb6c7b3a8caa34568b07ce9a12 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 9 Jan 2019 16:34:39 +0200 Subject: [PATCH 11/22] Fix "Runtime Error: Dictionary size changed during iteration" // Resolve #2003 --- HISTORY.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 651451d4..37b2acd1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,8 @@ PlatformIO 3.0 - CLion: Improved project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of full path * Fixed an issue with incorrect detecting of compatibility (LDF) between generic library and Arduino or ARM mbed frameworks +* Fixed "Runtime Error: Dictionary size changed during iteration" + (`issue #2003 `_) 3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ From d5d95092c4cedb6dc3d0f907638c83b01845f872 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Jan 2019 19:14:03 +0200 Subject: [PATCH 12/22] Fix an error "Could not extract item..." when extracting TAR archive with symbolic items on Windows platform // Resolve #2015 --- HISTORY.rst | 2 ++ platformio/unpacker.py | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 37b2acd1..24134227 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,8 @@ PlatformIO 3.0 * Fixed an issue with incorrect detecting of compatibility (LDF) between generic library and Arduino or ARM mbed frameworks * Fixed "Runtime Error: Dictionary size changed during iteration" (`issue #2003 `_) +* Fixed an error "Could not extract item..." when extracting TAR archive with symbolic items on Windows platform + (`issue #2015 `_) 3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/unpacker.py b/platformio/unpacker.py index 8f55b42d..11c23814 100644 --- a/platformio/unpacker.py +++ b/platformio/unpacker.py @@ -13,7 +13,7 @@ # limitations under the License. from os import chmod -from os.path import exists, islink, join +from os.path import exists, join from tarfile import open as tarfile_open from time import mktime from zipfile import ZipFile @@ -56,6 +56,10 @@ class TARArchive(ArchiveBase): def get_item_filename(self, item): return item.name + @staticmethod + def islink(item): + return item.islnk() or item.issym() + class ZIPArchive(ArchiveBase): @@ -80,6 +84,9 @@ class ZIPArchive(ArchiveBase): def get_item_filename(self, item): return item.filename + def islink(self, item): + raise NotImplementedError() + def after_extract(self, item, dest_dir): self.preserve_permissions(item, dest_dir) self.preserve_mtime(item, dest_dir) @@ -120,7 +127,9 @@ class FileUnpacker(object): for item in self._unpacker.get_items(): filename = self._unpacker.get_item_filename(item) item_path = join(dest_dir, filename) - if not islink(item_path) and not exists(item_path): - raise exception.ExtractArchiveItemError(filename, dest_dir) - + try: + if not self._unpacker.islink(item) and not exists(item_path): + raise exception.ExtractArchiveItemError(filename, dest_dir) + except NotImplementedError: + pass return True From 19b5285d508ed64e31fd5d4b867a8183bde53920 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Jan 2019 19:33:15 +0200 Subject: [PATCH 13/22] Fix "TypeError : startswith first arg" when checking udev rules with PY3 // Resolve #2000 --- platformio/util.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index c5433ee3..d350c222 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -797,14 +797,10 @@ def merge_dicts(d1, d2, path=None): def ensure_udev_rules(): def _rules_to_set(rules_path): - result = set([]) - with open(rules_path, "rb") as fp: - for line in fp.readlines(): - line = line.strip() - if not line or line.startswith("#"): - continue - result.add(line) - return result + return set([ + l.strip() for l in get_file_contents(rules_path).split("\n") + if l.strip() and not l.startswith("#") + ]) if "linux" not in get_systype(): return None From 56cd55ba7d486b5befeb807e8d21c4e4555c2a0b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Jan 2019 21:57:39 +0200 Subject: [PATCH 14/22] Eclipse: Provide language standard to a project C/C++ indexer // Resolve #1010 --- HISTORY.rst | 2 ++ .../eclipse/.settings/language.settings.xml.tpl | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 24134227..2596a50c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,8 @@ PlatformIO 3.0 - Use full path to PlatformIO CLI when generating a project (`issue #1674 `_) - CLion: Improved project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of full path + - Eclipse: Provide language standard to a project C/C++ indexer + (`issue #1010 `_) * Fixed an issue with incorrect detecting of compatibility (LDF) between generic library and Arduino or ARM mbed frameworks * Fixed "Runtime Error: Dictionary size changed during iteration" diff --git a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl index 19740737..72895fb2 100644 --- a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl +++ b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl @@ -1,3 +1,8 @@ +% import re +% STD_RE = re.compile(r"(\-std=[a-z\+]+\d+)") +% cxx_stds = STD_RE.findall(cxx_flags) +% cxx_std = cxx_stds[-1] if cxx_stds else "" +% @@ -6,9 +11,9 @@ % if "windows" in systype: - + % else: - + % end @@ -21,9 +26,9 @@ % if "windows" in systype: - + % else: - + % end From 13430aa628ab80b9d424d3d7948a7f69ebecff0c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Jan 2019 12:52:00 +0200 Subject: [PATCH 15/22] Use GCC C++ compiler for Eclipse project indexer // Issue #1010 --- .../ide/tpls/eclipse/.settings/language.settings.xml.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl index 72895fb2..a119c8b2 100644 --- a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl +++ b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl @@ -11,9 +11,9 @@ % if "windows" in systype: - + % else: - + % end @@ -26,9 +26,9 @@ % if "windows" in systype: - + % else: - + % end From f058b8f18f79bdd184f7aa22948e24a388e3711a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Jan 2019 13:01:53 +0200 Subject: [PATCH 16/22] Fix PY3 Lint "consider-using-set-comprehension" --- platformio/util.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index d350c222..11364072 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -797,10 +797,8 @@ def merge_dicts(d1, d2, path=None): def ensure_udev_rules(): def _rules_to_set(rules_path): - return set([ - l.strip() for l in get_file_contents(rules_path).split("\n") - if l.strip() and not l.startswith("#") - ]) + return set(l.strip() for l in get_file_contents(rules_path).split("\n") + if l.strip() and not l.startswith("#")) if "linux" not in get_systype(): return None From d627a42268ee225d91f6a256220c002ec7418e75 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Jan 2019 14:07:35 +0200 Subject: [PATCH 17/22] Fix PyLint warning --- platformio/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platformio/util.py b/platformio/util.py index 11364072..5fe186d7 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -794,6 +794,15 @@ def merge_dicts(d1, d2, path=None): return d1 +def get_file_contents(path): + try: + with open(path) as f: + return f.read() + except UnicodeDecodeError: + with open(path, encoding="latin-1") as f: + return f.read() + + def ensure_udev_rules(): def _rules_to_set(rules_path): From b594c1171851e68b2580f8fb15f51409b31dba17 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 17 Jan 2019 17:56:21 +0200 Subject: [PATCH 18/22] Fix cmd_lib test --- tests/commands/test_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index 7fc6ca90..b67cec39 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -170,7 +170,7 @@ def test_global_lib_list(clirunner, validate_cliresult): ] versions2 = [ 'ArduinoJson@5.8.2', 'ArduinoJson@5.10.1', 'AsyncMqttClient@0.8.2', - 'AsyncTCP@1.0.1', 'NeoPixelBus@2.2.4', 'PJON@07fe9aa', 'PJON@1fb26fd', + 'NeoPixelBus@2.2.4', 'PJON@07fe9aa', 'PJON@1fb26fd', 'PubSubClient@bef5814', 'RFcontrol@77d4eb3f8a', 'RadioHead-1.62@0.0.0' ] assert set(versions1) >= set(versions2) From db0bbcc0434323b2e5da6326400c555e0987bb53 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 17 Jan 2019 18:04:52 +0200 Subject: [PATCH 19/22] CLion: Improve project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of USER_HOME --- platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl index 65423e22..a1c84d68 100644 --- a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl @@ -1,12 +1,12 @@ % def _normalize_path(path): -% if user_home_dir in path: +% if project_dir in path: +% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}") +% elif user_home_dir in path: % if "windows" in systype: % path = path.replace(user_home_dir, "$ENV{HOMEDRIVE}$ENV{HOMEPATH}") % else: % path = path.replace(user_home_dir, "$ENV{HOME}") % end -% elif project_dir in path: -% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}") % end % return path.replace("\\", "/") % end From 69065d8bd6098f569a2693f66ced61fd9e96a411 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 22 Jan 2019 21:59:26 +0200 Subject: [PATCH 20/22] Fix "ValueError: invalid literal for int() with base 10" // Resolve #2058 --- platformio/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/app.py b/platformio/app.py index 14c4de22..d3c82d25 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -226,9 +226,9 @@ class ContentCache(object): newlines = [] with open(self._db_path) as fp: for line in fp.readlines(): + line = line.strip() if "=" not in line: continue - line = line.strip() expire, path = line.split("=") if time() < int(expire) and isfile(path) and \ path not in paths_for_delete: From 28bca48eca07951deda8121b4ba836537842c006 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Jan 2019 01:08:13 +0200 Subject: [PATCH 21/22] Ignore examples for ststm8 on Linux --- tests/test_examples.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_examples.py b/tests/test_examples.py index d9588956..0727da75 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -37,7 +37,8 @@ def pytest_generate_tests(metafunc): if not p.is_embedded(): continue # issue with "version `CXXABI_1.3.9' not found (required by sdcc)" - if "linux" in util.get_systype() and p.name == "intel_mcs51": + if "linux" in util.get_systype() and p.name in ("intel_mcs51", + "ststm8"): continue examples_dir = join(p.get_dir(), "examples") assert isdir(examples_dir) From 367e4d663c4a0ea199b5743cdd52fda6db9daf41 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 23 Jan 2019 20:47:18 +0200 Subject: [PATCH 22/22] Bump version to 3.6.4 --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 2596a50c..fb8f8747 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 3.0 -------------- -3.6.4 (2018-??-??) +3.6.4 (2019-01-23) ~~~~~~~~~~~~~~~~~~ * Improved Project Generator for IDEs: diff --git a/platformio/__init__.py b/platformio/__init__.py index 07fa8a5d..bb0d7626 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "4b1") +VERSION = (3, 6, 4) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"