diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-04-08 15:57:45 +1000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-04-10 00:13:45 +0200 |
commit | 58e3c5323e343dcab1c528c6b6a44925b76cb297 (patch) | |
tree | 1cc31a5f950aee4759edc30890a75bc585d01fe9 /buildtools/wafsamba/samba_python.py | |
parent | 69b3d1944501f65427fbd12e4ddd3b66e67deedd (diff) | |
download | samba-58e3c5323e343dcab1c528c6b6a44925b76cb297.tar.gz samba-58e3c5323e343dcab1c528c6b6a44925b76cb297.tar.bz2 samba-58e3c5323e343dcab1c528c6b6a44925b76cb297.zip |
build: Replace #!/usr/bin/env python with passed in PYTHON=
This means that if we were forced to use a specific python for the build, we
will put that binary into the top of samba-tool, so it continues to work
after the install.
Andrew Bartlett
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'buildtools/wafsamba/samba_python.py')
-rw-r--r-- | buildtools/wafsamba/samba_python.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index b2172f71a1..847b431f7d 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -5,6 +5,16 @@ from samba_utils import * from samba_autoconf import * from Configure import conf + +@conf +def SAMBA_CHECK_PYTHON(conf, mandatory=True): + # enable tool to build python extensions + conf.find_program('python', var='PYTHON', mandatory=mandatory) + conf.check_tool('python') + path_python = conf.find_program('python') + conf.env.PYTHON_SPECIFIED = (conf.env.PYTHON != path_python) + conf.check_python_version((2,4,2)) + @conf def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): if conf.env["python_headers_checked"] == []: |