Allow to use dependencies separated with comma + space

This commit is contained in:
Ivan Kravets
2016-09-01 21:34:37 +03:00
parent b6269188fe
commit 85439dbff7
2 changed files with 15 additions and 9 deletions

View File

@ -194,7 +194,7 @@ if :option:`platformio run --environment` option is not specified.
:ref:`projectconf_pio_env_default` allows to define environments which :ref:`projectconf_pio_env_default` allows to define environments which
should be processed by default. should be processed by default.
Multiple environments are allowed if they are separated with ``,`` (comma). Multiple environments are allowed if they are separated with ``, `` (comma+space).
For example. For example.
.. code-block:: ini .. code-block:: ini
@ -286,7 +286,7 @@ Examples:
:ref:`frameworks` name. :ref:`frameworks` name.
The multiple frameworks are allowed, split them with comma ``,`` separator. The multiple frameworks are allowed, split them with comma+space ``, ``.
.. _projectconf_env_board: .. _projectconf_env_board:
@ -701,13 +701,17 @@ Library options
Specify project dependencies that should be installed automatically to Specify project dependencies that should be installed automatically to
:ref:`projectconf_pio_libdeps_dir` before environment processing. :ref:`projectconf_pio_libdeps_dir` before environment processing.
Multiple dependencies are allowed (multi-lines). Multiple dependencies are allowed (multi-lines or separated with comma+space
``, ``).
**Valid forms** **Valid forms**
.. code-block:: ini .. code-block:: ini
[env:myenv] [env:myenv]
lib_deps = LIBRARY_1, LIBRARY_2, LIBRARY_N
[env:myenv2]
lib_deps = lib_deps =
LIBRARY_1 LIBRARY_1
LIBRARY_2 LIBRARY_2
@ -744,7 +748,7 @@ processed in the first order.
The correct value for this option is library name (not folder name). In the The correct value for this option is library name (not folder name). In the
most cases, library name is pre-defined in manifest file most cases, library name is pre-defined in manifest file
(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple (:ref:`library_config`, ``library.properties``, ``module.json``). The multiple
library names are allowed, split them with comma ``,`` separator. library names are allowed, split them with comma+space ``, ``.
Example: Example:
@ -766,7 +770,7 @@ Specify libraries which should be ignored by Library Dependency Finder.
The correct value for this option is library name (not The correct value for this option is library name (not
folder name). In the most cases, library name is pre-defined in manifest file folder name). In the most cases, library name is pre-defined in manifest file
(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple (:ref:`library_config`, ``library.properties``, ``module.json``). The multiple
library names are allowed, split them with comma ``,`` separator. library names are allowed, split them with comma+space ``, ``.
Example: Example:
@ -786,7 +790,7 @@ Example:
A list with extra directories/storages where Library Dependency Finder will A list with extra directories/storages where Library Dependency Finder will
look for dependencies. Multiple paths are allowed. Please separate them look for dependencies. Multiple paths are allowed. Please separate them
using comma ``,`` symbol. using comma+space ``, ``.
This option can be set by global environment variable This option can be set by global environment variable
:envvar:`PLATFORMIO_LIB_EXTRA_DIRS`. :envvar:`PLATFORMIO_LIB_EXTRA_DIRS`.
@ -847,7 +851,7 @@ Test options
Please make sure to read :ref:`unit_testing` guide first. Please make sure to read :ref:`unit_testing` guide first.
Ignore tests where the name matches specified patterns. Multiple names are Ignore tests where the name matches specified patterns. Multiple names are
allowed. Please separate them using comma ``,`` symbol. Also, you can allowed. Please separate them using comma+space ``, ``. Also, you can
ignore some tests using :option:`platformio test --ignore` command. ignore some tests using :option:`platformio test --ignore` command.
.. list-table:: .. list-table::

View File

@ -153,7 +153,7 @@ class EnvironmentProcessor(object):
process_opts = [] process_opts = []
for k, v in self.options.items(): for k, v in self.options.items():
if "\n" in v: if "\n" in v:
process_opts.append((k, "; ".join( process_opts.append((k, ", ".join(
[s.strip() for s in v.split("\n") if s.strip()]))) [s.strip() for s in v.split("\n") if s.strip()])))
else: else:
process_opts.append((k, v)) process_opts.append((k, v))
@ -237,7 +237,9 @@ class EnvironmentProcessor(object):
], self.verbose) ], self.verbose)
if "lib_deps" in self.options: if "lib_deps" in self.options:
_autoinstall_libdeps(self.cmd_ctx, [ _autoinstall_libdeps(self.cmd_ctx, [
d.strip() for d in self.options['lib_deps'].split("\n") d.strip()
for d in self.options['lib_deps'].split(
"\n" if "\n" in self.options['lib_deps'] else ", ")
if d.strip() if d.strip()
], self.verbose) ], self.verbose)