#!/usr/bin/env python3
"""Environment and source contract preflight wrapper (no heavy fitting)."""
import argparse,importlib,platform,subprocess,sys
from pathlib import Path
for mod in ['numpy','pandas','joblib','scipy','sklearn']:
    pkg=importlib.import_module(mod)
    print(f'[ENV] {mod}={getattr(pkg,"__version__","unknown")}',flush=True)
print(f'[ENV] python={platform.python_version()} executable={sys.executable}',flush=True)
cmd=[sys.executable,str(Path(__file__).with_name('train_suite32.py')),'--stage','preflight']+sys.argv[1:]
raise SystemExit(subprocess.call(cmd))
