From f1db36419d5bb5961e9b4362321c5df675e76819 Mon Sep 17 00:00:00 2001 From: "Tahir H. Butt" Date: Fri, 21 Jul 2023 15:23:15 -0400 Subject: [PATCH] fix: pin pip for pip-tools<7 --- riot/riot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/riot/riot.py b/riot/riot.py index 94886ef..1e3e00f 100644 --- a/riot/riot.py +++ b/riot/riot.py @@ -472,6 +472,12 @@ def requirements(self) -> str: _dir = os.path.join(DEFAULT_RIOT_PATH, "requirements") os.makedirs(_dir, exist_ok=True) in_path = os.path.join(_dir, "{}.in".format(self.short_hash)) + # pip==23.2 included a breaking change for pip-tools but not available + # pip-tools==7.0 fixes this but also dropped support for 3.7 + if self.py.version_info()[:2] == (3, 7): + subprocess.check_output( + [self.py.path(), "-m", "pip", "install", "pip<23.2"], + ) subprocess.check_output( [self.py.path(), "-m", "pip", "install", "pip-tools"], )