diff --git a/HISTORY.rst b/HISTORY.rst index 04aafc9d..ecd4dd04 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -27,6 +27,7 @@ PlatformIO Core 4 - Send a text to device on ENTER with ``send_on_enter`` filter (`issue #926 `_) - Show a hexadecimal representation of the data (code point of each character) with ``hexlify`` filter +* New standalone (1-script) `PlatformIO Core Installer `_ * Initial support for `Renode `__ simulation framework (`issue #3401 `_) * Added support for Arm Mbed "module.json" ``dependencies`` field (`issue #3400 `_) * Improved support for Arduino "library.properties" ``depends`` field diff --git a/docs b/docs index 1f615138..0af3f530 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 1f6151389291d3c7babec8db0b50154b00666761 +Subproject commit 0af3f53030196d1e9dec83e380814048ab9948ce diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index 192421b1..9d99ea97 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -17,7 +17,7 @@ import io import sys import subprocess -NEW_SCRIPT_URL = "https://raw.githubusercontent.com/platformio/platformio-core-installer/develop/get-platformio.py" +MAIN_SCRIPT_URL = "https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py" def download_with_requests(url, dst): @@ -33,10 +33,11 @@ def download_with_requests(url, dst): def download_with_urllib3(url, dst): import urllib3 - http = urllib3.PoolManager() - r = http.request('GET', url, preload_content=False) - with open(dst, 'wb') as out: + http = urllib3.PoolManager() + r = http.request("GET", url, preload_content=False) + + with open(dst, "wb") as out: while True: data = r.read(io.DEFAULT_BUFFER_SIZE) if not data: @@ -55,7 +56,7 @@ def download_with_urllib(url, dst): response = urlopen(url) CHUNK = 16 * 1024 - with open(dst, 'wb') as f: + with open(dst, "wb") as f: while True: chunk = response.read(CHUNK) if not chunk: @@ -81,7 +82,7 @@ def download_file(url, dst): download_with_urllib3, download_with_urllib, download_with_curl, - download_with_wget + download_with_wget, ] for method in methods: try: @@ -89,14 +90,12 @@ def download_file(url, dst): return dst except: pass - raise Exception("Could not download file '%s' to '%s' "%(url, dst)) + raise Exception("Could not download file '%s' to '%s' " % (url, dst)) def main(): - print("This installer script is deprecated and will be removed in the next release. Please use %s" % - NEW_SCRIPT_URL) with tempfile.NamedTemporaryFile() as tmp_file: - dst = download_file(NEW_SCRIPT_URL, str(tmp_file.name)) + dst = download_file(MAIN_SCRIPT_URL, str(tmp_file.name)) command = [sys.executable, dst] command.extend(sys.argv[1:]) subprocess.check_call(command)