mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Improved "core.call" RPC for PlatformIO Home // Resolve #3671
This commit is contained in:
@ -12,6 +12,7 @@ PlatformIO Core 5
|
|||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
- Automatically build PlatformIO Core extra Python dependencies on a host machine if they are missed in the registry (`issue #3700 <https://github.com/platformio/platformio-core/issues/3700>`_)
|
- Automatically build PlatformIO Core extra Python dependencies on a host machine if they are missed in the registry (`issue #3700 <https://github.com/platformio/platformio-core/issues/3700>`_)
|
||||||
|
- Improved "core.call" RPC for PlatformIO Home (`issue #3671 <https://github.com/platformio/platformio-core/issues/3671>`_)
|
||||||
- Fixed a "PermissionError: [WinError 5]" on Windows when external repository is used with `lib_deps <https://docs.platformio.org/page/projectconf/section_env_library.html#lib-deps>`__ option (`issue #3664 <https://github.com/platformio/platformio-core/issues/3664>`_)
|
- Fixed a "PermissionError: [WinError 5]" on Windows when external repository is used with `lib_deps <https://docs.platformio.org/page/projectconf/section_env_library.html#lib-deps>`__ option (`issue #3664 <https://github.com/platformio/platformio-core/issues/3664>`_)
|
||||||
- Fixed a "KeyError: 'versions'" when dependency does not exist in the registry (`issue #3666 <https://github.com/platformio/platformio-core/issues/3666>`_)
|
- Fixed a "KeyError: 'versions'" when dependency does not exist in the registry (`issue #3666 <https://github.com/platformio/platformio-core/issues/3666>`_)
|
||||||
- Fixed an issue with GCC linker when "native" dev-platform is used in pair with library dependencies (`issue #3669 <https://github.com/platformio/platformio-core/issues/3669>`_)
|
- Fixed an issue with GCC linker when "native" dev-platform is used in pair with library dependencies (`issue #3669 <https://github.com/platformio/platformio-core/issues/3669>`_)
|
||||||
|
@ -47,7 +47,7 @@ __pioremote_endpoint__ = "ssl:host=remote.platformio.org:port=4413"
|
|||||||
__default_requests_timeout__ = (10, None) # (connect, read)
|
__default_requests_timeout__ = (10, None) # (connect, read)
|
||||||
|
|
||||||
__core_packages__ = {
|
__core_packages__ = {
|
||||||
"contrib-piohome": "~3.3.0",
|
"contrib-piohome": "~3.3.1",
|
||||||
"contrib-pysite": "~2.%d%d.0" % (sys.version_info.major, sys.version_info.minor),
|
"contrib-pysite": "~2.%d%d.0" % (sys.version_info.major, sys.version_info.minor),
|
||||||
"tool-unity": "~1.20500.0",
|
"tool-unity": "~1.20500.0",
|
||||||
"tool-scons": "~2.20501.7" if sys.version_info.major == 2 else "~4.40001.0",
|
"tool-scons": "~2.20501.7" if sys.version_info.major == 2 else "~4.40001.0",
|
||||||
|
@ -95,10 +95,11 @@ class PIOCoreRPC(object):
|
|||||||
else:
|
else:
|
||||||
args[i] = str(arg)
|
args[i] = str(arg)
|
||||||
|
|
||||||
|
options = options or {}
|
||||||
to_json = "--json-output" in args
|
to_json = "--json-output" in args
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if args and args[0] == "remote":
|
if options.get("force_subprocess"):
|
||||||
result = yield PIOCoreRPC._call_subprocess(args, options)
|
result = yield PIOCoreRPC._call_subprocess(args, options)
|
||||||
defer.returnValue(PIOCoreRPC._process_result(result, to_json))
|
defer.returnValue(PIOCoreRPC._process_result(result, to_json))
|
||||||
else:
|
else:
|
||||||
@ -117,7 +118,7 @@ class PIOCoreRPC(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _call_inline(args, options):
|
def _call_inline(args, options):
|
||||||
PIOCoreRPC.setup_multithreading_std_streams()
|
PIOCoreRPC.setup_multithreading_std_streams()
|
||||||
cwd = (options or {}).get("cwd") or os.getcwd()
|
cwd = options.get("cwd") or os.getcwd()
|
||||||
|
|
||||||
def _thread_task():
|
def _thread_task():
|
||||||
with fs.cd(cwd):
|
with fs.cd(cwd):
|
||||||
|
@ -198,7 +198,9 @@ class ProjectRPC(object):
|
|||||||
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
||||||
):
|
):
|
||||||
args.extend(["--ide", state["storage"]["coreCaller"]])
|
args.extend(["--ide", state["storage"]["coreCaller"]])
|
||||||
d = PIOCoreRPC.call(args, options={"cwd": project_dir})
|
d = PIOCoreRPC.call(
|
||||||
|
args, options={"cwd": project_dir, "force_subprocess": True}
|
||||||
|
)
|
||||||
d.addCallback(self._generate_project_main, project_dir, framework)
|
d.addCallback(self._generate_project_main, project_dir, framework)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
@ -291,7 +293,9 @@ class ProjectRPC(object):
|
|||||||
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
||||||
):
|
):
|
||||||
args.extend(["--ide", state["storage"]["coreCaller"]])
|
args.extend(["--ide", state["storage"]["coreCaller"]])
|
||||||
d = PIOCoreRPC.call(args, options={"cwd": project_dir})
|
d = PIOCoreRPC.call(
|
||||||
|
args, options={"cwd": project_dir, "force_subprocess": True}
|
||||||
|
)
|
||||||
d.addCallback(self._finalize_arduino_import, project_dir, arduino_project_dir)
|
d.addCallback(self._finalize_arduino_import, project_dir, arduino_project_dir)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
@ -324,6 +328,8 @@ class ProjectRPC(object):
|
|||||||
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
and state["storage"]["coreCaller"] in ProjectGenerator.get_supported_ides()
|
||||||
):
|
):
|
||||||
args.extend(["--ide", state["storage"]["coreCaller"]])
|
args.extend(["--ide", state["storage"]["coreCaller"]])
|
||||||
d = PIOCoreRPC.call(args, options={"cwd": new_project_dir})
|
d = PIOCoreRPC.call(
|
||||||
|
args, options={"cwd": new_project_dir, "force_subprocess": True}
|
||||||
|
)
|
||||||
d.addCallback(lambda _: new_project_dir)
|
d.addCallback(lambda _: new_project_dir)
|
||||||
return d
|
return d
|
||||||
|
Reference in New Issue
Block a user