mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-05-05 21:27:37 -04:00
Ensure builtin module registration is deterministic
This commit is contained in:
@@ -67,7 +67,9 @@ class OcrmypdfPluginManager(pluggy.PluginManager):
|
||||
|
||||
# 1. Register builtins
|
||||
if self.__builtins:
|
||||
for module in pkgutil.iter_modules(ocrmypdf.builtin_plugins.__path__):
|
||||
for module in sorted(
|
||||
pkgutil.iter_modules(ocrmypdf.builtin_plugins.__path__)
|
||||
):
|
||||
name = f'ocrmypdf.builtin_plugins.{module.name}'
|
||||
module = importlib.import_module(name)
|
||||
self.register(module)
|
||||
|
||||
@@ -3,3 +3,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file exists only mark builtin_plugins as a package.
|
||||
# The plugin manager will not load it, so anything defined here may not be
|
||||
# processed as a module.
|
||||
|
||||
Reference in New Issue
Block a user