From 208ef1d6cdc3e08a488ef59bc5b07ba65e5125f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Kubler?= <gregoire.kubler@proton.me> Date: Tue, 21 May 2024 12:20:42 +0200 Subject: [PATCH] feat : now build_type depends of AIDGE_PYTHON_BUILD_TYPE and set to release by default --- setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3452f25fc..d184ef3bb 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,12 @@ class CMakeBuild(build_ext): # used to launch setup.py to setup PythonInterp python_executable = sys.executable print(f"python executable :\t{python_executable}") - compile_type = "Debug" + compile_type = ( + "Release" + if "AIDGE_PYTHON_BUILD_TYPE" not in os.environ + else os.environ["AIDGE_PYTHON_BUILD_TYPE"] + ) + install_path = ( os.path.join(sys.prefix, "lib", "libAidge") if "AIDGE_INSTALL" not in os.environ @@ -56,7 +61,7 @@ class CMakeBuild(build_ext): [ "cmake", str(cwd), - f"-DPYTHON_EXECUTABLE={sys.executable}", + f"-DPYTHON_EXECUTABLE={python_executable}", "-DTEST=OFF", f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}", f"-DCMAKE_BUILD_TYPE={compile_type}", -- GitLab