diff --git a/setup.py b/setup.py
index 2df428c2a335adae29baac2f73765e6b80d31b43..1a41bf5b79fe829c7c8bfa8b8d54d20b97acc740 100644
--- a/setup.py
+++ b/setup.py
@@ -42,22 +42,18 @@ class CMakeBuild(build_ext):
 
         os.chdir(str(build_temp))
 
-        python_executable = sys.executable 
-        python_include_dirs = sysconfig.get_path('include') 
-        python_library = sysconfig.get_config_var('LIBDIR') 
-        python_prefix = sys.exec_prefix 
-        print(f"python\texecutable\t{python_executable}") 
-        print(f"\t\t\tinclude\tdirs {python_include_dirs}") 
-        print(f"-DPYTHON_INCLUDE_DIRS={sysconfig.get_config_var('INCLUDEPY')}") 
-        print(f"\t\t\tlibrary\t{python_library}") 
-        print(f"-DPYTHON_LIBRARIES={sysconfig.get_config_var('LIBDEST')}") 
-        print(f"\t\t\tprefix\t{python_prefix}") 
+        # Impose to use the executable of the python
+        # used to launch setup.py to setup PythonInterp
+        python_executable = sys.executable
+        print(f"python executable :\t{python_executable}")
+        compile_type = (
+            "Release"
+            if "AIDGE_PYTHON_BUILD_TYPE" not in os.environ
+            else os.environ["AIDGE_PYTHON_BUILD_TYPE"]
+        )
 
         # Impose to use the executable of the python                                                                                                                                                  
         # used to launch setup.py to setup PythonInterp                                                                                                                                                   
-        python_executable = sys.executable                                                                                                                                                                
-        print(f"python executable :\t{python_executable}")                                                                                                                                                   
-        compile_type = "Debug"
         install_path = (
             os.path.join(sys.prefix, "lib", "libAidge")
             if "AIDGE_INSTALL" not in os.environ