@@ -408,6 +408,7 @@ def patch_skeleton_files(
408408 "###SITE###" : old_site_name ,
409409 "###ROOT###" : SitePaths .from_site_name (old_site_name ).home ,
410410 "###EDITION###" : new_replacements ["###EDITION###" ],
411+ "###PYTHON_MAJOR_MINOR###" : new_replacements ["###PYTHON_MAJOR_MINOR###" ],
411412 }
412413 skelroot = "/omd/versions/%s/skel" % omdlib .__version__
413414 with contextlib .chdir (skelroot ): # make relative paths
@@ -925,19 +926,22 @@ def update_file(
925926 new_skel = "/omd/versions/%s/skel" % new_version
926927
927928 site_home = SitePaths .from_site_name (site .name ).home
929+ python_major_minor = f"{ sys .version_info .major } .{ sys .version_info .minor } "
928930 new_replacements = {
929931 "###SITE###" : site .name ,
930932 "###ROOT###" : site_home ,
931933 # When calling this during "omd update", the site.version and site.edition still point to
932934 # the original edition, because we are still in the update prcedure and the version symlink
933935 # has not been changed yet.
934936 "###EDITION###" : new_edition ,
937+ "###PYTHON_MAJOR_MINOR###" : python_major_minor ,
935938 }
936939
937940 old_replacements = {
938941 "###SITE###" : site .name ,
939942 "###ROOT###" : site_home ,
940943 "###EDITION###" : old_edition ,
944+ "###PYTHON_MAJOR_MINOR###" : python_major_minor ,
941945 }
942946
943947 old_path = old_skel + "/" + relpath
0 commit comments