Subject: [PATCH] Sort modversions to be reproducible

From: Jochen Sprickerhof <[email-masked]>
Date: Wed, 8 Jul 2026 10:34:45 +0200

---
 dhfortran/module.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dhfortran/module.py b/dhfortran/module.py
index bc83e61..e89f2fa 100644
--- a/dhfortran/module.py
+++ b/dhfortran/module.py
@@ -297,7 +297,7 @@ def dh_fortran_mod(files, *args, **kwargs):
     fc_optional = cmplrs.get_fc_optional()
     for package in d.packages:
         if package in d.modversions:
-            for m in d.modversions[package]:
+            for m in sorted(d.modversions[package]):
                 default_comps = set()
                 optional_comps = set()
                 for c in cmplrs.compilers:
-- 
2.53.0