10 """Searches defaults.py for the VERSION field and returns it."""
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('python')
42 conf
.check_tool('pyuic4', 'build')
43 conf
.check_tool('po2qm', 'build')
45 #############################################################################
48 bld
.add_subdirs('ui ugit')
50 bin
= bld
.create_obj('py')
53 bin
.find_sources_in_dirs('bin')
55 qm
= bld
.create_obj('po2qm')
56 qm
.find_sources_in_dirs('po')
58 for icon
in glob
.glob('icons/*.png'):
59 Common
.install_files('ICONS', '', icon
)
61 Common
.symlink_as('BIN', 'git-ugit.py', 'ugit')
63 #############################################################################
66 """Returns a lib/python2.x/site-packages path relative to prefix"""
67 api_version
= sys
.version
[:3]
68 python_api
= 'python' + api_version
69 return os
.path
.join(prefix
, 'lib', python_api
, 'site-packages')