Add a --with-python configuration option

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-09-20 18:37:33 +01:00
parent 6af75cc695
commit b80154549c

View File

@@ -52,6 +52,9 @@ def options(opt):
help=('Path to an existing pybindgen source tree to use.'),
default=None,
dest='with_pybindgen', type="string")
opt.add_option('--with-python',
help=('Path to the Python interpreter to use.'),
default=None, dest='with_python', type="string")
def configure(conf):
@@ -81,7 +84,12 @@ def configure(conf):
Logs.warn("Python is not supported in CygWin environment. Try MingW instead.")
return
## Check for Python
if Options.options.with_python is not None:
conf.env.PYTHON = Options.options.with_python
try:
conf.check_tool('python')
conf.check_python_version((2,3))