From fc2ccbb8109189ad4781eb7f8c4ba46de5e9076b Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Wed, 15 Mar 2023 14:59:42 +0800 Subject: [PATCH] [Polish extension.h] extension.h add PADDLE_NO_PATHON macro (#51647) --- paddle/extension.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/extension.h b/paddle/extension.h index 2d38d51cd36..1a8243cb569 100644 --- a/paddle/extension.h +++ b/paddle/extension.h @@ -16,7 +16,7 @@ limitations under the License. */ // All paddle apis in C++ frontend #include "paddle/phi/api/all.h" -// Python bindings for the C++ frontend -#ifndef PADDLE_ON_INFERENCE +// Python bindings for the C++ frontend (includes Python.h) +#if !defined(PADDLE_ON_INFERENCE) && !defined(PADDLE_NO_PYTHON) #include "paddle/utils/pybind.h" #endif -- GitLab