Finalized api rename
[ugit.git] / wscript
blobeab983ae7c52cd34f2a71a33fb827b5e22ed8950
1 #!/usr/bin/env python
2 from os.path import join
3 from glob import glob
5 import Params
6 from Common import install_files
7 from wafutils import pymod
8 from wafutils import configure_python
9 from wafutils import configure_pyqt
10 from wafutils import wafutils_dir
12 # ===========================================================================
13 # Mandatory variables
14 # ===========================================================================
16 APPNAME = 'ugit'
17 VERSION = 'current'
19 srcdir = '.'
20 blddir = 'build'
22 # ===========================================================================
23 # Configure/Build
24 # ===========================================================================
26 def set_options(opt):
27 opt.tool_options('python')
28 opt.tool_options('pyuic4', wafutils_dir())
30 opt.parser.remove_option('--prefix')
31 opt.add_option('--prefix', type='string', default=None,
32 help='Set installation prefix', dest='prefix')
33 pass
35 def configure(conf):
36 env = conf.env
37 if Params.g_options.prefix is None:
38 env['PREFIX'] = '/shared/packages/%s-%s' % ( APPNAME, VERSION )
40 env['PYMODS'] = pymod(env['PREFIX'])
41 env['PYMODS_UGIT'] = join(env['PYMODS'], 'ugitlibs')
42 env['ICONS'] = join(env['PYMODS_UGIT'], 'icons')
43 env['BIN'] = join(env['PREFIX'], 'bin')
45 configure_python(conf)
46 configure_pyqt(conf)
49 def build(bld):
50 bld.add_subdirs('py ui')
52 bin = bld.create_obj('py')
53 bin.inst_var = 'BIN'
54 bin.chmod = 0755
55 bin.find_sources_in_dirs('bin')
57 for icon in glob('icons/*.png'):
58 install_files ('ICONS', '', icon)