dmart 1.4.14__py3-none-any.whl → 1.4.15__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-1.4.14.dist-info → dmart-1.4.15.dist-info}/METADATA +1 -1
- {dmart-1.4.14.dist-info → dmart-1.4.15.dist-info}/RECORD +6 -6
- dmart.py +8 -25
- {dmart-1.4.14.dist-info → dmart-1.4.15.dist-info}/WHEEL +0 -0
- {dmart-1.4.14.dist-info → dmart-1.4.15.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.14.dist-info → dmart-1.4.15.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
alembic.ini,sha256=zs8d8VhH9TRwZrPK697EZPBCfaKvI4SqTuGuG0FAm2Y,3747
|
|
2
2
|
bundler.py,sha256=so8ZJResb1PcOH5vboa_mpFAdYr_T8u8DbbFXd570Lg,1704
|
|
3
3
|
data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
|
|
4
|
-
dmart.py,sha256=
|
|
4
|
+
dmart.py,sha256=ZoJwS2D0acAqSvsxwucOGwDDxVXAqnpxx64IkW6PVgA,23217
|
|
5
5
|
get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
|
|
6
6
|
info.json,sha256=hXQWl19lfMkEj_zXdehGeKjiKGNJ7emY4S7d4pIqJ1E,123
|
|
7
7
|
main.py,sha256=KZGhIL6AnEm5ZAPy4IvhBDpzSTjuodilV7NafNOyhzM,19676
|
|
@@ -282,8 +282,8 @@ utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGVqo,700
|
|
|
282
282
|
utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
|
|
283
283
|
utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
|
|
284
284
|
utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
|
|
285
|
-
dmart-1.4.
|
|
286
|
-
dmart-1.4.
|
|
287
|
-
dmart-1.4.
|
|
288
|
-
dmart-1.4.
|
|
289
|
-
dmart-1.4.
|
|
285
|
+
dmart-1.4.15.dist-info/METADATA,sha256=24CUQVxx3UY6pxDWKIYTH6BfPkcn6CdliEgXpH77ohI,2069
|
|
286
|
+
dmart-1.4.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
287
|
+
dmart-1.4.15.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
|
|
288
|
+
dmart-1.4.15.dist-info/top_level.txt,sha256=XELQhaIfj-qupnyBrir39qFRh8ncu1RXkCHeitzqLLg,275
|
|
289
|
+
dmart-1.4.15.dist-info/RECORD,,
|
dmart.py
CHANGED
|
@@ -551,36 +551,19 @@ def main():
|
|
|
551
551
|
sys.exit(1)
|
|
552
552
|
|
|
553
553
|
try:
|
|
554
|
-
# Check if alembic library is installed
|
|
555
|
-
import importlib.metadata
|
|
554
|
+
# Check if alembic library is installed
|
|
556
555
|
try:
|
|
557
|
-
|
|
558
|
-
|
|
556
|
+
from alembic.config import Config
|
|
557
|
+
from alembic import command
|
|
558
|
+
except ImportError:
|
|
559
559
|
print("Error: 'alembic' library not found. Please install it with 'pip install alembic'.")
|
|
560
560
|
sys.exit(1)
|
|
561
561
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
# Create a temporary alembic.ini to override script_location with absolute path
|
|
565
|
-
with tempfile.NamedTemporaryFile(mode='w', suffix='.ini', delete=False) as tf:
|
|
566
|
-
with open(original_ini_path, 'r') as f:
|
|
567
|
-
content = f.read()
|
|
568
|
-
|
|
569
|
-
content = re.sub(r'^script_location\s*=.*$', f'script_location = {alembic_dir.as_posix()}', content, flags=re.MULTILINE)
|
|
570
|
-
tf.write(content)
|
|
571
|
-
temp_ini_path = tf.name
|
|
562
|
+
alembic_cfg = Config(str(original_ini_path))
|
|
563
|
+
alembic_cfg.set_main_option("script_location", alembic_dir.as_posix())
|
|
572
564
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
result = subprocess.run(
|
|
576
|
-
[sys.executable, "-m", "alembic", "-c", temp_ini_path, "upgrade", "head"],
|
|
577
|
-
cwd=pkg_dir
|
|
578
|
-
)
|
|
579
|
-
if result.returncode != 0:
|
|
580
|
-
sys.exit(result.returncode)
|
|
581
|
-
finally:
|
|
582
|
-
if os.path.exists(temp_ini_path):
|
|
583
|
-
os.unlink(temp_ini_path)
|
|
565
|
+
# Run alembic upgrade head
|
|
566
|
+
command.upgrade(alembic_cfg, "head")
|
|
584
567
|
|
|
585
568
|
except Exception as e:
|
|
586
569
|
print(f"Error running migration: {e}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|