mirror of
https://github.com/platformio/platformio-core.git
synced 2025-09-26 05:50:56 +02:00
Propagate full PYTHONPATH only for Windows
This commit is contained in:
@@ -359,7 +359,11 @@ def copy_pythonpath_to_osenv():
|
|||||||
if "PYTHONPATH" in os.environ:
|
if "PYTHONPATH" in os.environ:
|
||||||
_PYTHONPATH = os.environ.get("PYTHONPATH").split(os.pathsep)
|
_PYTHONPATH = os.environ.get("PYTHONPATH").split(os.pathsep)
|
||||||
for p in os.sys.path:
|
for p in os.sys.path:
|
||||||
if p not in _PYTHONPATH:
|
conditions = [p not in _PYTHONPATH]
|
||||||
|
if "windows" not in get_systype():
|
||||||
|
conditions.append(
|
||||||
|
isdir(join(p, "click")) or isdir(join(p, "platformio")))
|
||||||
|
if all(conditions):
|
||||||
_PYTHONPATH.append(p)
|
_PYTHONPATH.append(p)
|
||||||
os.environ['PYTHONPATH'] = os.pathsep.join(_PYTHONPATH)
|
os.environ['PYTHONPATH'] = os.pathsep.join(_PYTHONPATH)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user