7 from os
.path
import join
8 from distutils
.sysconfig
import get_python_version
12 """Runs version.sh and returns the output."""
13 cmd
= join(os
.getcwd(), 'scripts', 'version.sh')
17 return version
.strip()
19 #############################################################################
22 VERSION
= get_version()
27 #############################################################################
30 opt
.tool_options('python')
31 opt
.tool_options('pyuic4', 'build')
34 #############################################################################
38 prefix
= env
['PREFIX']
39 bindir
= join(prefix
, 'bin')
40 sitepackages
= pymod(prefix
)
41 modules
= join(sitepackages
, 'ugit')
42 views
= join(modules
, 'views')
43 controllers
= join(modules
, 'controllers')
44 icons
= join(prefix
, 'share', 'ugit', 'icons')
46 env
['UGIT_BINDIR'] = bindir
47 env
['UGIT_MODULES'] = modules
48 env
['UGIT_VIEWS'] = views
49 env
['UGIT_CONTROLLERS'] = controllers
50 env
['UGIT_ICONS'] = icons
52 conf
.check_tool('misc')
53 conf
.check_tool('python')
54 conf
.check_tool('pyuic4', 'build')
55 conf
.check_tool('po2qm', 'build')
57 #############################################################################
60 bld
.add_subdirs('scripts ui ugit')
62 qm
= bld
.create_obj('po2qm')
63 qm
.find_sources_in_dirs('po')
65 for icon
in glob
.glob('icons/*.png'):
66 Common
.install_files('UGIT_ICONS', '', icon
)
68 #############################################################################
71 """Returns a lib/python2.x/site-packages path relative to prefix"""
72 python_api
= 'python' + get_python_version()
73 return join(prefix
, 'lib', python_api
, 'site-packages')