8 #############################################################################
15 #############################################################################
18 opt
.tool_options('python')
19 opt
.tool_options('pyuic4', 'buildutils')
22 #############################################################################
26 env
['PYMODS'] = pymod(env
['PREFIX'])
27 env
['PYMODS_UGIT'] = os
.path
.join(env
['PYMODS'], 'ugitlibs')
28 env
['ICONS'] = os
.path
.join(env
['PREFIX'], 'share', 'ugit', 'icons')
29 env
['BIN'] = os
.path
.join(env
['PREFIX'], 'bin')
31 if not conf
.check_tool('python'):
32 Params
.fatal('Error: could not find Python.')
34 if not conf
.check_tool('pyuic4', 'buildutils'):
35 Params
.fatal('Error: missing PyQt4 development tools.')
37 if not conf
.check_tool('po2qm', 'buildutils'):
38 Params
.fatal('Error: missing msgfmt executable.')
40 #############################################################################
43 bld
.add_subdirs('ui ugitlibs')
45 bin
= bld
.create_obj('py')
48 bin
.find_sources_in_dirs('bin')
50 qm
= bld
.create_obj('po2qm')
51 qm
.find_sources_in_dirs('po')
53 for icon
in glob
.glob('icons/*.png'):
54 Common
.install_files('ICONS', '', icon
)
56 Common
.symlink_as('BIN', 'ugit.py', 'ugit')
58 #############################################################################
61 '''Returns a lib/python2.x/site-packages path relative to prefix'''
62 api_version
= sys
.version
[:3]
63 python_api
= 'python' + api_version
64 return os
.path
.join(prefix
, 'lib', python_api
, 'site-packages')