forked from platformio/platformio-core
Fixed an issue when configuration file options partly ignored when `--project-conf
` // Resolve #3034 (#3055)
* Fixed an issue when configuration file options partly ignored when using custom ``--project-conf`` // Resolve #3034 * Py2 compatible makedirs * Fix circle dependency * Fix broken import in test examples * Fix history * Remove YAPF markers * PyLint fix * Fix invalid project conf path * Move PIO Core to the root on Windows, issue with long CPPPATHs * Respect global PLATFORMIO_BUILD_CACHE_DIR env var * Fix Appveyor paths * Minor changes
This commit is contained in:
@ -17,7 +17,7 @@ import hashlib
|
||||
import os
|
||||
import uuid
|
||||
from os import environ, getenv, listdir, remove
|
||||
from os.path import abspath, dirname, expanduser, isdir, isfile, join
|
||||
from os.path import abspath, dirname, isdir, isfile, join
|
||||
from time import time
|
||||
|
||||
import requests
|
||||
@ -25,21 +25,11 @@ import requests
|
||||
from platformio import exception, fs, lockfile
|
||||
from platformio.compat import WINDOWS, dump_json_to_unicode, hashlib_encode_data
|
||||
from platformio.proc import is_ci
|
||||
from platformio.project.helpers import get_project_cache_dir, get_project_core_dir
|
||||
|
||||
|
||||
def get_default_projects_dir():
|
||||
docs_dir = join(expanduser("~"), "Documents")
|
||||
try:
|
||||
assert WINDOWS
|
||||
import ctypes.wintypes
|
||||
|
||||
buf = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
|
||||
ctypes.windll.shell32.SHGetFolderPathW(None, 5, None, 0, buf)
|
||||
docs_dir = buf.value
|
||||
except: # pylint: disable=bare-except
|
||||
pass
|
||||
return join(docs_dir, "PlatformIO", "Projects")
|
||||
from platformio.project.helpers import (
|
||||
get_default_projects_dir,
|
||||
get_project_cache_dir,
|
||||
get_project_core_dir,
|
||||
)
|
||||
|
||||
|
||||
def projects_dir_validate(projects_dir):
|
||||
@ -88,7 +78,12 @@ DEFAULT_SETTINGS = {
|
||||
},
|
||||
}
|
||||
|
||||
SESSION_VARS = {"command_ctx": None, "force_option": False, "caller_id": None}
|
||||
SESSION_VARS = {
|
||||
"command_ctx": None,
|
||||
"force_option": False,
|
||||
"caller_id": None,
|
||||
"custom_project_conf": None,
|
||||
}
|
||||
|
||||
|
||||
class State(object):
|
||||
@ -415,6 +410,6 @@ def get_cid():
|
||||
uid = uuid.getnode()
|
||||
cid = uuid.UUID(bytes=hashlib.md5(hashlib_encode_data(uid)).digest())
|
||||
cid = str(cid)
|
||||
if WINDOWS or os.getuid() > 0: # yapf: disable pylint: disable=no-member
|
||||
if WINDOWS or os.getuid() > 0: # pylint: disable=no-member
|
||||
set_state_item("cid", cid)
|
||||
return cid
|
||||
|
Reference in New Issue
Block a user