10 """Runs version.sh and returns the output."""
11 cmd
= os
.path
.join(os
.getcwd(), 'scripts', 'version.sh')
15 return version
.strip()
17 #############################################################################
20 VERSION
= get_version()
25 #############################################################################
28 opt
.tool_options('python')
29 opt
.tool_options('pyuic4', 'build')
32 #############################################################################
36 env
['PYMODS'] = pymod(env
['PREFIX'])
37 env
['PYMODS_UGIT'] = os
.path
.join(env
['PYMODS'], 'ugit')
38 env
['ICONS'] = os
.path
.join(env
['PREFIX'], 'share', 'ugit', 'icons')
39 env
['BIN'] = os
.path
.join(env
['PREFIX'], 'bin')
41 conf
.check_tool('misc')
42 conf
.check_tool('python')
43 conf
.check_tool('pyuic4', 'build')
44 conf
.check_tool('po2qm', 'build')
46 #############################################################################
49 bld
.add_subdirs('scripts ui ugit')
51 bin
= bld
.create_obj('py')
54 bin
.find_sources_in_dirs('bin')
56 qm
= bld
.create_obj('po2qm')
57 qm
.find_sources_in_dirs('po')
59 for icon
in glob
.glob('icons/*.png'):
60 Common
.install_files('ICONS', '', icon
)
62 Common
.symlink_as('BIN', 'git-ugit.py', 'ugit')
64 #############################################################################
67 """Returns a lib/python2.x/site-packages path relative to prefix"""
68 api_version
= sys
.version
[:3]
69 python_api
= 'python' + api_version
70 return os
.path
.join(prefix
, 'lib', python_api
, 'site-packages')