python_misc_OBJ_FILES = scripting/python/misc_wrap.o
-PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py
+_PY_FILES = $(shell find scripting/python -name "*.py")
+
+$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst scripting/python/%,%,$(pyfile)),$(pyfile))))
installpython:: pythonmods
@$(SHELL) $(srcdir)/script/installpython.sh \