diff options
| author | Robert Collins <robertc@robertcollins.net> | 2006-04-17 14:13:35 +1000 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2006-04-17 14:13:35 +1000 |
| commit | 4ff83274f7a9c20297c3484e994ba584c1771b31 (patch) | |
| tree | 7271a783780b915b7212f8c389f214ed1c71974c /python/SConscript | |
| parent | f1767091373ba1c3bb98af804b3bcb16802604c0 (diff) | |
| download | subunit-git-4ff83274f7a9c20297c3484e994ba584c1771b31.tar.gz | |
Finish stage one conversion to scons.
Diffstat (limited to 'python/SConscript')
| -rw-r--r-- | python/SConscript | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/python/SConscript b/python/SConscript new file mode 100644 index 0000000..416ff9f --- /dev/null +++ b/python/SConscript @@ -0,0 +1,24 @@ +Import('*') +# describe what we need for Python + +EnsurePythonVersion(2, 4) + +import distutils.sysconfig +import os.path + +# distutils default prefix is the common path between +# distutils.sysconfig.get_python_lib and distutils.sysconfig.get_python_inc +prefix = os.path.commonprefix([ + distutils.sysconfig.get_python_lib(), + distutils.sysconfig.get_python_inc(), + ]) +# suffix to install .py files to is distutils.sysconfig.get_python_lib() +# after the common prefix +python_suffix = distutils.sysconfig.get_python_lib()[len(prefix):] +# install path for python is then in DESTDIR + python_suffix +python_installdir = DESTDIR + python_suffix + '/subunit' +env.Alias('install', [Install(python_installdir, 'subunit/__init__.py')]) +# tests +tests = [] +tests.append(env.TestPython('check_python', 'test_python.py', PYTHONPATH='python')) +env.Alias('check', tests) |
