dmart 1.4.38__py3-none-any.whl → 1.4.39__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.
dmart/dmart.py CHANGED
@@ -420,9 +420,6 @@ def main():
420
420
  case "hyper":
421
421
  hypercorn_main()
422
422
  case "cli":
423
- cli_path = Path(__file__).resolve().parent.parent / "cli"
424
- sys.path.append(str(cli_path))
425
-
426
423
  config_file = None
427
424
  if "--config" in sys.argv:
428
425
  idx = sys.argv.index("--config")
@@ -438,12 +435,33 @@ def main():
438
435
  home_config = Path.home() / ".dmart" / "config.ini"
439
436
  if home_config.exists():
440
437
  config_file = str(home_config)
441
- else:
442
- config_file = str(cli_path / "config.ini")
443
438
 
444
- os.environ["BACKEND_ENV"] = config_file
445
- import cli
446
- cli.main()
439
+ if config_file:
440
+ os.environ["BACKEND_ENV"] = config_file
441
+
442
+ # Try to find cli.py in the package or nearby
443
+ try:
444
+ import cli
445
+ cli.main()
446
+ except ImportError:
447
+ # Check if it's in the same directory as dmart.py (installed via MANIFEST.in)
448
+ dmart_dir = Path(__file__).resolve().parent
449
+ cli_path = dmart_dir / "cli.py"
450
+ if cli_path.exists():
451
+ if str(dmart_dir) not in sys.path:
452
+ sys.path.append(str(dmart_dir))
453
+ import cli
454
+ cli.main()
455
+ else:
456
+ # Fallback for local development
457
+ cli_path = dmart_dir.parent / "cli"
458
+ if cli_path.exists():
459
+ sys.path.append(str(cli_path))
460
+ import cli
461
+ cli.main()
462
+ else:
463
+ print("Error: cli.py not found.")
464
+ sys.exit(1)
447
465
  case "serve":
448
466
  open_cxb = False
449
467
  if "--open-cxb" in sys.argv:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dmart
3
- Version: 1.4.38
3
+ Version: 1.4.39
4
4
  Requires-Python: >=3.11
5
5
  Requires-Dist: fastapi
6
6
  Requires-Dist: pydantic
@@ -5,7 +5,7 @@ dmart/config.env.sample,sha256=CKd4KIBeUatoFcO2IefmrVNBohpaVMQMFcoPkNBvCeI,696
5
5
  dmart/conftest.py,sha256=0ry_zeCmdBNLbm5q115b-pkOrUFYxdsOUXbIMkr7E5Y,362
6
6
  dmart/curl.sh,sha256=lmHSFVr5ft-lc5Aq9LfvKyWfntrfYbnirhzx1EGjp_A,15743
7
7
  dmart/data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
8
- dmart/dmart.py,sha256=K4r56p6yasr2_Imm7DrcH-Bk9oQS1q5palogrVKVRgU,23605
8
+ dmart/dmart.py,sha256=Hmejqz79xFMJAJztnTEtqYm7XA1B1blIHryuZ48D8AI,24377
9
9
  dmart/get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
10
10
  dmart/hypercorn_config.toml,sha256=-eryppEG8HBOM_KbFc4dTQePnpyfoW9ZG5aUATU_6yM,50
11
11
  dmart/info.json,sha256=5Yz4tc5dEt5eVrM2LzLhXgN8vGvE0aDbbbEEaGDsD5k,123
@@ -278,8 +278,8 @@ dmart/utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGV
278
278
  dmart/utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
279
279
  dmart/utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
280
280
  dmart/utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
281
- dmart-1.4.38.dist-info/METADATA,sha256=F8fVK2mpN_Avfa2E3nJx8iuhiJ1W6SqF6530sWjz9Xo,2571
282
- dmart-1.4.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
283
- dmart-1.4.38.dist-info/entry_points.txt,sha256=N832M4wG8d2GDw1xztKRVM3TnxpY2QDzvdFE8XaWaG8,43
284
- dmart-1.4.38.dist-info/top_level.txt,sha256=zJo4qk9fUW0BGIR9f4DCfpxaXbvQXH9izIOom6JsyAo,6
285
- dmart-1.4.38.dist-info/RECORD,,
281
+ dmart-1.4.39.dist-info/METADATA,sha256=GZGdPHieT1FqO4Baoab0MvxcAUm3DNXsnywyPMH6c08,2571
282
+ dmart-1.4.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
283
+ dmart-1.4.39.dist-info/entry_points.txt,sha256=N832M4wG8d2GDw1xztKRVM3TnxpY2QDzvdFE8XaWaG8,43
284
+ dmart-1.4.39.dist-info/top_level.txt,sha256=zJo4qk9fUW0BGIR9f4DCfpxaXbvQXH9izIOom6JsyAo,6
285
+ dmart-1.4.39.dist-info/RECORD,,
File without changes