From 947a6034e3d29647bbddf4dd2df1fa0a4aa9574e Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 27 Aug 2019 21:33:01 +0200 Subject: [PATCH] Update platformio patch for latest change See also https://github.com/platformio/platformio-core/commit/8059e04499fd4d54195c3d75b74a2804aadb6be8 --- esphome/platformio_api.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/esphome/platformio_api.py b/esphome/platformio_api.py index f113d3067a..a2626c604e 100644 --- a/esphome/platformio_api.py +++ b/esphome/platformio_api.py @@ -29,11 +29,10 @@ def patch_structhash(): from platformio.project.helpers import get_project_dir else: from platformio.util import get_project_dir - from os.path import join, isdir, getmtime, isfile + from os.path import join, isdir, getmtime from os import makedirs - def patched_clean_build_dir(build_dir): - structhash_file = join(build_dir, "structure.hash") + def patched_clean_build_dir(build_dir, *args): platformio_ini = join(get_project_dir(), "platformio.ini") # if project's config is modified @@ -43,21 +42,6 @@ def patch_structhash(): if not isdir(build_dir): makedirs(build_dir) - if is_platformio4(): - from platformio.project import helpers - proj_hash = helpers.calculate_project_hash() - else: - proj_hash = run.calculate_project_hash() - - # check project structure - if isdir(build_dir) and isfile(structhash_file): - with open(structhash_file) as f: - if f.read() == proj_hash: - return - - with open(structhash_file, "w") as f: - f.write(proj_hash) - # pylint: disable=protected-access if is_platformio4(): run.helpers.clean_build_dir = patched_clean_build_dir