File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 23
23
from platformio .package .version import pepver_to_semver
24
24
from platformio .compat import IS_WINDOWS
25
25
26
+ PLATFORMIO_URL_VERSION_RE = re .compile (
27
+ r'/v?(\d+\.\d+\.\d+(?:[.-]\w+)?(?:\.\d+)?)(?:\.(?:zip|tar\.gz|tar\.bz2))?$' ,
28
+ re .IGNORECASE ,
29
+ )
30
+
26
31
# Python dependencies required for the build process
27
32
python_deps = {
28
33
"uv" : ">=0.1.0" ,
@@ -101,7 +106,7 @@ def get_packages_to_install(deps, installed_packages):
101
106
elif name == "platformio" :
102
107
# Enforce the version from the direct URL if it looks like one.
103
108
# If version can't be parsed, fall back to accepting any installed version.
104
- m = re .search (r'/v?(\d+\.\d+\.\d+(?:[.-]\w+)?(?:\.\d+)?)(?:\.(?:zip|tar\.gz|tar\.bz2))?$' , spec )
109
+ m = PLATFORMIO_URL_VERSION_RE .search (spec )
105
110
if m :
106
111
expected_ver = pepver_to_semver (m .group (1 ))
107
112
if installed_packages .get (name ) != expected_ver :
You can’t perform that action at this time.
0 commit comments