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 2323from platformio .package .version import pepver_to_semver
2424from platformio .compat import IS_WINDOWS
2525
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+
2631# Python dependencies required for the build process
2732python_deps = {
2833 "uv" : ">=0.1.0" ,
@@ -101,7 +106,7 @@ def get_packages_to_install(deps, installed_packages):
101106 elif name == "platformio" :
102107 # Enforce the version from the direct URL if it looks like one.
103108 # 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 )
105110 if m :
106111 expected_ver = pepver_to_semver (m .group (1 ))
107112 if installed_packages .get (name ) != expected_ver :
You can’t perform that action at this time.
0 commit comments