mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Do not install tool-unity for even non-test proejct
This commit is contained in:
@ -59,7 +59,7 @@ def _dump_includes(env):
|
|||||||
includes["toolchain"].extend([os.path.realpath(inc) for inc in glob(g)])
|
includes["toolchain"].extend([os.path.realpath(inc) for inc in glob(g)])
|
||||||
|
|
||||||
includes["unity"] = []
|
includes["unity"] = []
|
||||||
unity_dir = get_core_package_dir("tool-unity")
|
unity_dir = get_core_package_dir("tool-unity", auto_install=False)
|
||||||
if unity_dir:
|
if unity_dir:
|
||||||
includes["unity"].append(unity_dir)
|
includes["unity"].append(unity_dir)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ from platformio.package.meta import PackageItem, PackageSpec
|
|||||||
from platformio.proc import get_pythonexe_path
|
from platformio.proc import get_pythonexe_path
|
||||||
|
|
||||||
|
|
||||||
def get_core_package_dir(name):
|
def get_core_package_dir(name, auto_install=True):
|
||||||
if name not in __core_packages__:
|
if name not in __core_packages__:
|
||||||
raise exception.PlatformioException("Please upgrade PlatformIO Core")
|
raise exception.PlatformioException("Please upgrade PlatformIO Core")
|
||||||
pm = ToolPackageManager()
|
pm = ToolPackageManager()
|
||||||
@ -37,6 +37,8 @@ def get_core_package_dir(name):
|
|||||||
pkg = pm.get_package(spec)
|
pkg = pm.get_package(spec)
|
||||||
if pkg:
|
if pkg:
|
||||||
return pkg.path
|
return pkg.path
|
||||||
|
if not auto_install:
|
||||||
|
return None
|
||||||
assert pm.install(spec)
|
assert pm.install(spec)
|
||||||
_remove_unnecessary_packages()
|
_remove_unnecessary_packages()
|
||||||
return pm.get_package(spec).path
|
return pm.get_package(spec).path
|
||||||
|
Reference in New Issue
Block a user