#!/usr/bin/env python2.4
# -*- encoding: latin-1 -*-
#@+leo-ver=4-encoding=latin-1,.
#@+node:@file SConstruct
#@@first
#@@first
#@@language python
#@@encoding latin-1

import os, sys
from subprocess import Popen
from glob import glob

installer = os.path.join('..', 'pyinstaller', 'Build.py')
spec = 'test.spec'

if sys.platform == 'win32':
    target = 'test.exe'
    def Build(env, target, source):
        Popen(['python', installer, spec])
    buildcmd = Build
else:
    target = 'test'
    buildcmd = 'python2.4 %s %s' % (installer, spec)

Command(target, [spec, 'test.py'], buildcmd)

Clean(target, ['.sconsign', 
               glob('*.pyc'), 
               'buildtest',
               'warntest.txt',
               '.sconsign',
               glob('*.pkg'),
               glob('*.db')])

#@-node:@file SConstruct
#@-leo
