7 from os
.path
import join
11 """Runs version.sh and returns the output."""
12 cmd
= join(os
.getcwd(), 'scripts', 'version.sh')
16 return version
.strip()
18 #############################################################################
21 VERSION
= get_version()
26 #############################################################################
29 opt
.tool_options('python')
30 opt
.tool_options('pyuic4', 'build')
33 #############################################################################
36 conf
.check_tool('misc')
37 conf
.check_tool('python')
38 conf
.check_tool('pyuic4', 'build')
39 conf
.check_tool('po2qm', 'build')
41 conf
.sub_config('python-git')
44 prefix
= env
['PREFIX']
45 bindir
= join(prefix
, 'bin')
46 share
= join(prefix
, 'share')
47 modules
= join(share
, 'ugit')
48 views
= join(modules
, 'views')
49 controllers
= join(modules
, 'controllers')
50 icons
= join(prefix
, 'share', 'ugit', 'icons')
51 apps
= join(prefix
, 'share', 'applications')
53 env
['UGIT_BINDIR'] = bindir
54 env
['UGIT_MODULES'] = modules
55 env
['UGIT_VIEWS'] = views
56 env
['UGIT_CONTROLLERS'] = controllers
57 env
['UGIT_ICONS'] = icons
58 env
['UGIT_APPS'] = apps
60 #############################################################################
70 qm
= bld
.create_obj('po2qm')
71 qm
.find_sources_in_dirs('po')
73 for icon
in glob
.glob('icons/*.png'):
74 Common
.install_files('UGIT_ICONS', '', icon
)
76 #############################################################################
79 # always re-create the version.py file
80 for variant
in Params
.g_build
.m_allenvs
:
81 version_file
= join(Params
.g_build
.m_bdir
,
82 variant
, 'scripts', 'version.py')
83 if os
.path
.exists(version_file
):
84 os
.unlink(version_file
)