From 6970950f7ec3059e47b6b25733797613f6e89a33 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Wed, 6 Nov 2024 14:43:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E2=9A=A1=EF=B8=8F=20=5Finstall=20loade?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyencrypt/loader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyencrypt/loader.py b/pyencrypt/loader.py index 56f78a7..a4f6bc2 100644 --- a/pyencrypt/loader.py +++ b/pyencrypt/loader.py @@ -107,5 +107,9 @@ def invalidate_caches(cls): # TODO: generate randomly AES Class -machinery.EXTENSION_SUFFIXES.append(ENCRYPT_SUFFIX) -sys.meta_path.insert(0, EncryptFileFinder) +def _install(): + machinery.EXTENSION_SUFFIXES.append(ENCRYPT_SUFFIX) + sys.meta_path.insert(0, EncryptFileFinder) + + +_install()