fixe ci
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Ehsan.Asadi
2025-12-31 04:48:57 +03:30
parent 2056fdb5ed
commit 6683ed1f15

View File

@@ -12,6 +12,18 @@ import importlib.util
import os
import sys
# Register this module in sys.modules so Python can find peikarband.peikarband
# This is critical when running from /app/peikarband directory
_current_module = sys.modules[__name__]
_parent_package_name = __name__.rsplit('.', 1)[0] # 'peikarband' from 'peikarband.peikarband'
if _parent_package_name not in sys.modules:
# If peikarband package is not in sys.modules, we need to create it
import types
_parent_package = types.ModuleType(_parent_package_name)
sys.modules[_parent_package_name] = _parent_package
_parent_package.__path__ = [os.path.dirname(os.path.dirname(os.path.abspath(__file__)))]
_parent_package.__file__ = os.path.join(_parent_package.__path__[0], '__init__.py')
# Get the parent directory (peikarband/) and load app.py directly
_parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
_app_file = os.path.join(_parent_dir, 'app.py')
@@ -29,5 +41,3 @@ app = _app_module.app
__all__ = ["app"]
__all__ = ["app"]