<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main():
 """ Build a standalone dql executable """

    venv_dir = tempfile.mkdtemp()
    try:
        make_virtualenv(venv_dir)

        print("Downloading dependencies")
        pip = os.path.join(venv_dir, "bin", "pip")
        subprocess.check_call([pip, "install", "pex"])

        print("Building executable")
        pex = os.path.join(venv_dir, "bin", "pex")
        subprocess.check_call([pex, "dql", "-m", "dql:main", "-o", "dql"])

        print("dql executable written to %s" % os.path.abspath("dql"))
    finally:
        shutil.rmtree(venv_dir)