1+ # build_winpython_meta.py
12import os
23import sys
34# Use tomllib if available (Python 3.11+), otherwise fall back to tomli
1011 print ("Please install tomli for Python < 3.11: pip install tomli" )
1112 sys .exit (1 )
1213
13- #import yaml
14+ #import yaml: we choose toml, more python standard
1415import subprocess
1516from pathlib import Path
1617
@@ -20,8 +21,6 @@ def load_builds(config_file):
2021 builds = config ["builds" ]
2122 python_versions = config .get ("pythons" , {})
2223 return builds , python_versions
23- #with open(config_file, "r", encoding="utf-8") as f:
24- # return yaml.safe_load(f)["builds"]
2524
2625def run_build (build , python_versions ):
2726 print (f"\n === Building WinPython: { build ['name' ]} ===" )
@@ -46,10 +45,7 @@ def run_build(build, python_versions):
4645 my_release = vinfo .get ("release" , "" )
4746 my_release_level = vinfo .get ("my_release_level" , "b0" )
4847 mandatory_requirements = vinfo .get ("mandatory_requirements" , os .path .join (os .getcwd (), "mandatory_requirements.txt" ))
49-
50- # Get Python release info from TOML [pythons]
5148 my_constraints = build .get ("my_constraints" , r"C:\WinP\constraints.txt" )
52- target_python_exe = build .get ("target_python_exe" , "python.exe" )
5349
5450 # Build directory logic
5551 my_basedir = f"{ root_dir_for_builds } \\ bd{ my_python_target } "
0 commit comments