--- core/src/plugins/filed/CMakeLists.txt	2019-12-12 12:04:14.000000000 -0500
+++ core/src/plugins/filed/CMakeLists.txt	2019-12-28 16:26:47.855833000 -0500
@@ -100,18 +100,18 @@
    INSTALL(TARGETS test-plugin-fd DESTINATION ${plugindir} COMPONENT filedaemon)
 endif()
 
-set (PYFILES
-    bareos-fd.py.template
-    bareos-fd-local-fileset.py
-    bareos-fd-mock-test.py
-    BareosFdPluginBaseclass.py
-    BareosFdPluginLocalFileset.py
-    BareosFdWrapper.py
-    bareos_fd_consts.py
-    bareos-fd-ldap.py
-    BareosFdPluginLDAP.py
-    )
+if (python)
+   set (PYFILES
+       bareos-fd.py.template
+       bareos-fd-local-fileset.py
+       bareos-fd-mock-test.py
+       BareosFdPluginBaseclass.py
+       BareosFdPluginLocalFileset.py
+       BareosFdWrapper.py
+       bareos_fd_consts.py
+       bareos-fd-ldap.py
+       BareosFdPluginLDAP.py
+       )
 
-INSTALL(FILES ${PYFILES} DESTINATION ${plugindir} COMPONENT filedaemon)
-
-
+   INSTALL(FILES ${PYFILES} DESTINATION ${plugindir} COMPONENT filedaemon)
+endif()
