#!/usr/bin/env python3
import os
import pathlib
import sys

# Said before the first import of the setup's code, which an older Python cannot read.
if sys.version_info < (3, 14):
	sys.exit(f"build-release needs Python 3.14 or later as python3 on PATH; it found Python {sys.version.split()[0]}")

LAUNCHER = pathlib.Path(__file__).resolve()
sys.path.insert(0, str(LAUNCHER.parent))

from loop_effects import effects
from build_release.loop import main
from loop_state import paths

sys.exit(main.main(sys.argv[1:], os.environ, paths.paths_from(pathlib.Path.home(), os.environ), LAUNCHER, pathlib.Path.cwd(), effects.system_effects(pathlib.Path.home(), os.environ)))
