README updates
[ugit.git] / buildutils / __init__.py
blob1490e9bb541409af6d247a416d970f3a7c00ac29
1 #!/usr/bin/env python
2 import os
3 import platform
4 import Params
6 def pymod(prefix):
7 '''Returns a lib/python2.x/site-packages path relative to prefix'''
8 python_ver = platform.python_version_tuple()
9 python_ver_str = 'python' + '.'.join(python_ver[:2])
10 return os.path.join (prefix, 'lib', python_ver_str, 'site-packages')
12 def configure_python(conf):
13 if not conf.check_tool ('python'):
14 Params.fatal ('Error: could not find a Python installation.')
16 def configure_pyqt(conf):
17 # pyuic4 is a custom build object, hence the 2nd parameter
18 if not conf.check_tool ('pyuic4', os.path.dirname (__file__)):
19 Params.fatal ('Error: missing PyQt4 development tools.\n'
20 + 'Hint: on Debian systems try:\n'
21 + '\tapt-get install pyqt4-dev-tools python-qt4-dev')