Only import the COPR builder when MBS is configured to use it

This commit is contained in:
mprahl
2017-11-14 10:18:24 -05:00
parent 245f8fb3c5
commit b1fe673699

View File

@@ -1,5 +1,6 @@
import pkg_resources
from module_build_service import conf
from base import GenericBuilder
__all__ = [
@@ -7,4 +8,7 @@ __all__ = [
]
for entrypoint in pkg_resources.iter_entry_points('mbs.builder_backends'):
GenericBuilder.register_backend_class(entrypoint.load())
# Only import the copr builder if it is configured since we don't want to include the copr
# module as a dependency for all installations
if entrypoint.name != "copr" or conf.system == 'copr':
GenericBuilder.register_backend_class(entrypoint.load())