From ab12d44db7776c244d190c4d0ef70ec1599c8900 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 9 Feb 2026 21:31:03 -0600 Subject: [PATCH] Migrate to new constraints location --- addonmanager_preferences_defaults.json | 2 +- addonmanager_utilities.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addonmanager_preferences_defaults.json b/addonmanager_preferences_defaults.json index 3e395c7a..05665994 100644 --- a/addonmanager_preferences_defaults.json +++ b/addonmanager_preferences_defaults.json @@ -33,7 +33,7 @@ "last_fetched_macro_cache_hash": "Cache never fetched, no hash available", "macro_cache_url": "https://addons.freecad.org/macro_cache.zip", "old_backup_handling": "ask", - "pip_constraints_path": "https://raw.githubusercontent.com/FreeCAD/FreeCAD-addons/refs/heads/master/constraints/", + "pip_constraints_path": "https://raw.githubusercontent.com/FreeCAD/Addons/refs/heads/main/Data/Python/", "proxy_settings_migrated_2025": false, "proxy_type": "system", "proxy_host": "none", diff --git a/addonmanager_utilities.py b/addonmanager_utilities.py index fe53f64c..953acd37 100644 --- a/addonmanager_utilities.py +++ b/addonmanager_utilities.py @@ -632,15 +632,15 @@ def create_pip_call(args: List[str]) -> List[str]: parsed_url = urlparse(constraints) major = sys.version_info.major minor = sys.version_info.minor - expected_filename = f"constraints-py{major}{minor}.txt" + expected_rel_path = f"{major}.{minor}/constraints.txt" if parsed_url.scheme == "https": # The only supported remote scheme is https, and this is the default setup if not constraints.endswith("/"): constraints += "/" - constraints += expected_filename + constraints += expected_rel_path else: # If it wasn't https, treat it like it's a local path - constraints = os.path.join(constraints, expected_filename) + constraints = os.path.join(constraints, expected_rel_path.replace("/", os.path.sep)) args.extend(["--constraint", constraints]) call_args.extend(args)