2 from os
.path
import join
6 from Common
import install_files
7 from wafutils
import pymod
8 from wafutils
import configure_python
9 from wafutils
import configure_pyqt
10 from wafutils
import wafutils_dir
12 # ===========================================================================
14 # ===========================================================================
22 # ===========================================================================
24 # ===========================================================================
27 opt
.tool_options('python')
28 opt
.tool_options('pyuic4', wafutils_dir())
30 opt
.parser
.remove_option('--prefix')
31 opt
.add_option('--prefix', type='string', default
=None,
32 help='Set installation prefix', dest
='prefix')
37 if Params
.g_options
.prefix
is None:
38 env
['PREFIX'] = '/shared/packages/%s-%s' % ( APPNAME
, VERSION
)
40 env
['PYMODS'] = pymod(env
['PREFIX'])
41 env
['PYMODS_UGIT'] = join(env
['PYMODS'], 'ugit')
42 env
['ICONS'] = join(env
['PYMODS_UGIT'], 'icons')
43 env
['BIN'] = join(env
['PREFIX'], 'bin')
45 configure_python(conf
)
50 bld
.add_subdirs('py ui')
52 bin
= bld
.create_obj('py')
55 bin
.find_sources_in_dirs('bin')
57 api
= bld
.create_obj('py')
58 api
.inst_var
= 'PYMODS'
59 api
.find_sources_in_dirs('api')
61 for icon
in glob('icons/*.png'):
62 install_files ('ICONS', '', icon
)