From b80154549c47788b6fc66208d0cd5fdc987eb7b3 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 20 Sep 2011 18:37:33 +0100 Subject: [PATCH] Add a --with-python configuration option --- bindings/python/wscript | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bindings/python/wscript b/bindings/python/wscript index 346af4579..af537894d 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -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))