mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Switch temporary to develop version
This commit is contained in:
@ -18,7 +18,6 @@ import sys
|
|||||||
from platform import system
|
from platform import system
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
|
|
||||||
CURINTERPRETER_PATH = os.path.normpath(sys.executable)
|
CURINTERPRETER_PATH = os.path.normpath(sys.executable)
|
||||||
IS_WINDOWS = system().lower() == "windows"
|
IS_WINDOWS = system().lower() == "windows"
|
||||||
|
|
||||||
@ -64,11 +63,7 @@ def fix_winpython_pathenv():
|
|||||||
|
|
||||||
|
|
||||||
def exec_command(*args, **kwargs):
|
def exec_command(*args, **kwargs):
|
||||||
result = {
|
result = {"out": None, "err": None, "returncode": None}
|
||||||
"out": None,
|
|
||||||
"err": None,
|
|
||||||
"returncode": None
|
|
||||||
}
|
|
||||||
|
|
||||||
kwargs['stdout'] = subprocess.PIPE
|
kwargs['stdout'] = subprocess.PIPE
|
||||||
kwargs['stderr'] = subprocess.PIPE
|
kwargs['stderr'] = subprocess.PIPE
|
||||||
@ -119,11 +114,15 @@ def install_platformio():
|
|||||||
r = None
|
r = None
|
||||||
cmd = ["-m", "pip.__main__" if sys.version_info < (2, 7, 0) else "pip"]
|
cmd = ["-m", "pip.__main__" if sys.version_info < (2, 7, 0) else "pip"]
|
||||||
try:
|
try:
|
||||||
r = exec_python_cmd(cmd + ["install", "-U", "platformio"])
|
# r = exec_python_cmd(cmd + ["install", "-U", "platformio"])
|
||||||
|
r = exec_python_cmd(cmd + [
|
||||||
|
"install", "-U",
|
||||||
|
"https://github.com/platformio/platformio/archive/develop.zip"
|
||||||
|
])
|
||||||
assert r['returncode'] == 0
|
assert r['returncode'] == 0
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
r = exec_python_cmd(
|
r = exec_python_cmd(cmd + ["--no-cache-dir", "install", "-U",
|
||||||
cmd + ["--no-cache-dir", "install", "-U", "platformio"])
|
"platformio"])
|
||||||
if r:
|
if r:
|
||||||
print_exec_result(r)
|
print_exec_result(r)
|
||||||
|
|
||||||
@ -151,13 +150,10 @@ def main():
|
|||||||
print(str(e))
|
print(str(e))
|
||||||
print("[FAILURE]")
|
print("[FAILURE]")
|
||||||
|
|
||||||
permission_errors = (
|
permission_errors = ("permission denied", "not permitted")
|
||||||
"permission denied",
|
if (any([m in str(e).lower() for m in permission_errors]) and
|
||||||
"not permitted"
|
not IS_WINDOWS):
|
||||||
)
|
print("""
|
||||||
if (any([m in str(e).lower() for m in permission_errors]) and not
|
|
||||||
IS_WINDOWS):
|
|
||||||
print ("""
|
|
||||||
-----------------
|
-----------------
|
||||||
Permission denied
|
Permission denied
|
||||||
-----------------
|
-----------------
|
||||||
@ -176,7 +172,7 @@ https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platf
|
|||||||
else:
|
else:
|
||||||
print("\n ==> Installation process has been "
|
print("\n ==> Installation process has been "
|
||||||
"successfully FINISHED! <==\n")
|
"successfully FINISHED! <==\n")
|
||||||
print ("""
|
print("""
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
Please RESTART your Terminal Application
|
Please RESTART your Terminal Application
|
||||||
|
Reference in New Issue
Block a user