# -*- coding: utf-8 -*-
from setuphelpers import *
import glob

def install():
    mkdirs('/opt/python310/')
    f= glob.glob('*.tar.gz')[0]
    python_version = control.get_software_version()
    run('cd /opt/python310/ ; tar -xzf %s' % makepath(basedir,f))

def audit():
    python_version = run('/opt/python310/bin/python3 -V').split(' ')[1].strip()

    if Version(python_version) != control.get_software_version():
        print('version install : %s' % python_version)
        return "ERROR"
    else:
        return "OK"