maleo-foundation 0.1.29__py3-none-any.whl → 0.1.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -401,8 +401,17 @@ class ServiceManager:
401
401
  # Get the module path and add it to sys.path if needed
402
402
  self._loggers.application.info("Getting spec")
403
403
  spec = importlib.util.find_spec("app")
404
- if spec and spec.origin:
405
- module_path = os.path.dirname(os.path.dirname(spec.origin))
404
+ self._loggers.application.info(f"Spec: {spec}, Origin: {spec.origin if spec else None}")
405
+ if spec:
406
+ # For namespace packages, use the first entry in submodule_search_locations
407
+ if spec.origin is None and spec.submodule_search_locations:
408
+ module_path = os.path.dirname(spec.submodule_search_locations[0])
409
+ elif spec.origin:
410
+ module_path = os.path.dirname(os.path.dirname(spec.origin))
411
+ else:
412
+ # Fallback to the current directory
413
+ module_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
414
+
406
415
  if module_path not in sys.path:
407
416
  sys.path.insert(0, module_path)
408
417
 
@@ -418,7 +427,7 @@ class ServiceManager:
418
427
  port=self._configs.service.port,
419
428
  reload=True,
420
429
  log_level="debug",
421
- reload_dirs=[os.path.dirname(os.path.dirname(spec.origin))]
430
+ reload_dirs=[module_path]
422
431
  )
423
432
  except Exception as e:
424
433
  self._loggers.application.error(f"Error starting uvicorn: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.29
3
+ Version: 0.1.31
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -32,7 +32,7 @@ maleo_foundation/expanded_types/token.py,sha256=4fRTJw6W5MYq71NksNrWNi7qYHQ4_lQw
32
32
  maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  maleo_foundation/managers/db.py,sha256=Jf0w-9JOAG5X2quDxqqw6d2WUIX7MYGdlPGxWP0rxHs,4699
34
34
  maleo_foundation/managers/middleware.py,sha256=7CDXPMb28AR7J72TWOeKFxOlMypKezEtO9mr53a88B0,4032
35
- maleo_foundation/managers/service.py,sha256=XfBOybaMKlO4PrIb7iZ3pAHBgZIzfho-ToiMvHeBpg0,21349
35
+ maleo_foundation/managers/service.py,sha256=QVlwy7rHDCWsVCth-bj1p3y9kLFimFKya1VDwzSDam4,21881
36
36
  maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  maleo_foundation/managers/client/base.py,sha256=K8AFV2MTZrC1jbTqxkx7eedmxodJirNIjoRXGGcppy4,1022
38
38
  maleo_foundation/managers/client/http.py,sha256=dWFZlG1z4TERYBITReR5oSrlzvdhh2EtztVnsU8gCeA,2712
@@ -83,7 +83,7 @@ maleo_foundation/utils/logging.py,sha256=MwvZmZSA8SIdfq-knEvpYIgqnSpHcyHrZY9TVHW
83
83
  maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
84
84
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
85
85
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
86
- maleo_foundation-0.1.29.dist-info/METADATA,sha256=8alXdq0nnv-lrX9UV8Dv-y8WjQ9QrzNrvI4mFUJfIXY,3190
87
- maleo_foundation-0.1.29.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
88
- maleo_foundation-0.1.29.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
89
- maleo_foundation-0.1.29.dist-info/RECORD,,
86
+ maleo_foundation-0.1.31.dist-info/METADATA,sha256=b5IgeAgk4KUOoBRxGyIhA-XEbnuV7Q0t0ZsvMmrATQc,3190
87
+ maleo_foundation-0.1.31.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
88
+ maleo_foundation-0.1.31.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
89
+ maleo_foundation-0.1.31.dist-info/RECORD,,