mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Implemented new `[platformio]
` section for Configuration File | Resolve #14
This commit is contained in:
@ -4,6 +4,9 @@ Release History
|
||||
0.7.0 (?)
|
||||
---------
|
||||
|
||||
* Implemented new ``[platformio]`` section for Configuration File with ``home_dir``
|
||||
option (`issue #14 <https://github.com/ivankravets/platformio/issues/14>`_)
|
||||
|
||||
0.6.0 (2014-08-09)
|
||||
------------------
|
||||
|
||||
|
@ -14,6 +14,24 @@ The sections and their allowable values are described below.
|
||||
|
||||
.. contents::
|
||||
|
||||
[platformio]
|
||||
------------
|
||||
|
||||
A ``platformio`` section is used for overriding default configuration options
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``home_dir``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
A PlatformIO's home directory that is used to store platforms tools chain,
|
||||
frameworks, libraries, service data and etc.
|
||||
|
||||
|
||||
A default value is user's home directory: *Unix* - ``~/.platformio``,
|
||||
Windows - ``%HOMEPATH%\.platformio``.
|
||||
|
||||
[env:NAME]
|
||||
----------
|
||||
|
||||
|
@ -26,7 +26,15 @@ def get_systype():
|
||||
|
||||
|
||||
def get_home_dir():
|
||||
return expanduser("~/.platformio")
|
||||
home_dir = expanduser("~/.platformio")
|
||||
try:
|
||||
config = get_project_config()
|
||||
if (config.has_section("platformio") and
|
||||
config.has_option("platformio", "home_dir")):
|
||||
return config.get("platformio", "home_dir")
|
||||
except NotPlatformProject:
|
||||
pass
|
||||
return home_dir
|
||||
|
||||
|
||||
def get_source_dir():
|
||||
|
Reference in New Issue
Block a user