whitespace cleanup
[third_party/subunit] / python / SConscript
1 Import('*')
2 # describe what we need for Python
3
4 EnsurePythonVersion(2, 4)
5
6 import distutils.sysconfig
7 import os.path
8
9 # distutils default prefix is the common path between
10 # distutils.sysconfig.get_python_lib and distutils.sysconfig.get_python_inc
11 prefix = os.path.commonprefix([
12     distutils.sysconfig.get_python_lib(),
13     distutils.sysconfig.get_python_inc(),
14     ])
15 # suffix to install .py files to is distutils.sysconfig.get_python_lib()
16 # after the common prefix
17 python_suffix = distutils.sysconfig.get_python_lib()[len(prefix):]
18 # install path for python is then in DESTDIR + python_suffix
19 python_installdir = DESTDIR + python_suffix + '/subunit'
20 env.Alias('install', [Install(python_installdir, 'subunit/__init__.py')])