--- core/src/plugins/filed/CMakeLists.txt	2020-01-31 11:21:18.000000000 -0500
+++ core/src/plugins/filed/CMakeLists.txt	2020-01-31 15:54:40.841485000 -0500
@@ -100,24 +100,26 @@
   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
-    bareos-fd-ovirt.py
-    BareosFdPluginOvirt.py
-    bareos-fd-percona-xtrabackup.py
-    BareosFdPluginPerconaXtraBackup.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
+       bareos-fd-ovirt.py
+       BareosFdPluginOvirt.py
+       bareos-fd-percona-xtrabackup.py
+       BareosFdPluginPerconaXtraBackup.py
+   )
 
-install(
-  FILES ${PYFILES}
-  DESTINATION ${plugindir}
-  COMPONENT filedaemon
-)
+   install(
+     FILES ${PYFILES}
+     DESTINATION ${plugindir}
+     COMPONENT filedaemon
+   )
+endif()
