From 0dacbc3df69fbbb443f1ecaa0ee57c0157d47843 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 20 Feb 2018 11:38:12 -0700 Subject: [PATCH] Make python.require-py safe to use when python is not found at all. --- src/tools/python.jam | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/python.jam b/src/tools/python.jam index 0e0770374..273b28a1e 100644 --- a/src/tools/python.jam +++ b/src/tools/python.jam @@ -1044,7 +1044,11 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : # required properties. rule require-py ( properties * ) { - local py-ext-target = [ $(.project).find python_for_extensions ] ; + local py-ext-target = [ $(.project).find python_for_extensions : no-error ] ; + if ! $(py-ext-target) + { + return no ; + } local property-set = [ property-set.create $(properties) ] ; property-set = [ $(property-set).expand ] ; local py-ext-alternative = [ $(py-ext-target).select-alternatives $(property-set) ] ;