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

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

def audit():
    python_version = run('/opt/wapt/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"