Browse Source
Require minimum PlatformIO version (#20361)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Jason Smith <jason.inet@gmail.com>
vanilla_fb_2.0.x
Victor Oliveira
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
24 additions and
0 deletions
-
buildroot/share/PlatformIO/scripts/common-dependencies.py
|
|
@ -16,6 +16,30 @@ except ImportError: |
|
|
|
# PIO >= 4.4 |
|
|
|
from platformio.package.meta import PackageSpec as PackageManager |
|
|
|
|
|
|
|
PIO_VERSION_MIN = (5, 0, 3) |
|
|
|
try: |
|
|
|
from platformio import VERSION as PIO_VERSION |
|
|
|
weights = (1000, 100, 1) |
|
|
|
version_min = sum([x[0] * float(re.sub(r'[^0-9]', '.', str(x[1]))) for x in zip(weights, PIO_VERSION_MIN)]) |
|
|
|
version_cur = sum([x[0] * float(re.sub(r'[^0-9]', '.', str(x[1]))) for x in zip(weights, PIO_VERSION)]) |
|
|
|
if version_cur < version_min: |
|
|
|
print() |
|
|
|
print("**************************************************") |
|
|
|
print("****** An update to PlatformIO is ******") |
|
|
|
print("****** required to build Marlin Firmware. ******") |
|
|
|
print("****** ******") |
|
|
|
print("****** Minimum version: ", PIO_VERSION_MIN, " ******") |
|
|
|
print("****** Current Version: ", PIO_VERSION, " ******") |
|
|
|
print("****** ******") |
|
|
|
print("****** Update PlatformIO and try again. ******") |
|
|
|
print("**************************************************") |
|
|
|
print() |
|
|
|
exit(1) |
|
|
|
except SystemExit: |
|
|
|
exit(1) |
|
|
|
except: |
|
|
|
print("Can't detect PlatformIO Version") |
|
|
|
|
|
|
|
Import("env") |
|
|
|
|
|
|
|
#print(env.Dump()) |
|
|
|