From 776a2027fb07a819120273016f98600eff59738a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 28 Jun 2015 19:31:28 +0300 Subject: [PATCH] Rename "ignore_libs" env option to "lib_ignore" --- HISTORY.rst | 2 +- docs/projectconf.rst | 8 ++++---- platformio/builder/main.py | 6 +++--- platformio/builder/tools/platformio.py | 2 +- platformio/commands/run.py | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e5dc3bfb..59b240ee 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -297,7 +297,7 @@ Release History commands which allows to return the output in `JSON `_ format (`issue #42 `_) * Allowed to ignore some libs from *Library Dependency Finder* via - `ignore_libs `_ option + `lib_ignore `_ option * Improved `platformio run `__ command: asynchronous output for build process, timing and detailed information about environment configuration diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 2b228bdb..af298cb1 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -370,8 +370,8 @@ Example: [env:libs_with_highest_priority] use_libs = OneWire_ID1 -``ignore_libs`` -^^^^^^^^^^^^^^^ +``lib_ignore`` +^^^^^^^^^^^^^^ Specify libraries which should be ignored by ``Library Dependency Finder (LDF)`` @@ -380,10 +380,10 @@ Example: .. code-block:: ini [env:ignore_some_libs] - ignore_libs = SPI,EngduinoV3_ID123 + lib_ignore = SPI,EngduinoV3_ID123 ``lib_dfcyclic`` -^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^ Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``. By default, this option is turned OFF (``lib_dfcyclic=False``) and means, that diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 02a889b9..93cc5281 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -40,7 +40,7 @@ commonvars.AddVariables( ("BUILD_FLAGS",), ("SRCBUILD_FLAGS",), ("SRC_FILTER",), - ("IGNORE_LIBS",), + ("LIB_IGNORE",), ("USE_LIBS",), ("LIB_DFCYCLIC",), @@ -118,8 +118,8 @@ if "BOARD" in env: env.get("BOARD_OPTIONS", {}).get("platform"))) -if "IGNORE_LIBS" in env: - env['IGNORE_LIBS'] = [l.strip() for l in env['IGNORE_LIBS'].split(",")] +if "LIB_IGNORE" in env: + env['LIB_IGNORE'] = [l.strip() for l in env['LIB_IGNORE'].split(",")] env.PrependENVPath( "PATH", diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index b2ad1cfd..e88becb5 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -241,7 +241,7 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914 lib_name = basename(lib_dir) # ignore user's specified libs - if "IGNORE_LIBS" in env and lib_name in env['IGNORE_LIBS']: + if lib_name in env.get("LIB_IGNORE", []): continue if not isfile(inc_path): diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 15418bc8..d9ba2440 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -74,7 +74,8 @@ def cli(ctx, environment, target, upload_port, # pylint: disable=R0913,R0914 class EnvironmentProcessor(object): RENAMED_OPTIONS = { - "LDF_CYCLIC": "LIB_DFCYCLIC" + "LDF_CYCLIC": "LIB_DFCYCLIC", + "IGNORE_LIBS": "LIB_IGNORE" } def __init__(self, cmd_ctx, name, options, # pylint: disable=R0913