diff --git a/triqs/python_tools/py_stream.cpp b/triqs/python_tools/py_stream.cpp
index 6feeb6ac..e60e2a75 100644
--- a/triqs/python_tools/py_stream.cpp
+++ b/triqs/python_tools/py_stream.cpp
@@ -18,6 +18,7 @@
* TRIQS. If not, see .
*
******************************************************************************/
+#ifdef TRIQS_WITH_PYTHON_SUPPORT
#define TRIQS_LIB_CPP
#include "./py_stream.hpp"
#include "../utility/exceptions.hpp"
@@ -37,3 +38,6 @@ py_stream::py_stream() {
void py_stream::_write(const char* s) { pyref res = PyObject_CallMethod(sys_out, "write", "s", s); }
}
+
+#endif
+
diff --git a/triqs/python_tools/wrapper_tools.cpp b/triqs/python_tools/wrapper_tools.cpp
index 5f9a3b20..b9b3b203 100644
--- a/triqs/python_tools/wrapper_tools.cpp
+++ b/triqs/python_tools/wrapper_tools.cpp
@@ -1,3 +1,4 @@
+#ifdef TRIQS_WITH_PYTHON_SUPPORT
// REMOVE THIS
#include
@@ -16,3 +17,6 @@ template <> const char * make_format<5>::value = "O&O&O&O&O&";
pyref py_converter::group_type;
}}
+
+#endif
+