#!/usr/bin/env python
import os
import os.path as _path
import subprocess

__author__ = 'arnaud'

try:
    script_dir = os.path.dirname(os.path.realpath(__file__))
    root = _path.normpath(_path.join(script_dir, '../..'))

    subprocess.check_call(['python3', '-m', 'build', '--wheel'], cwd=root)

    print('Wheel built')
except subprocess.CalledProcessError as e:
    print('Error: Cannot build the wheel')
    raise e
