From 888c50d72ade2190739e6edaa192b76d1b03a9b0 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Mon, 25 Dec 2023 22:41:57 -0800 Subject: [PATCH] Fix running dmgbuild --- build-tools/zip_artifacts.py | 7 ++++--- setup.cfg | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build-tools/zip_artifacts.py b/build-tools/zip_artifacts.py index dd6acce..57dcebb 100644 --- a/build-tools/zip_artifacts.py +++ b/build-tools/zip_artifacts.py @@ -3,11 +3,12 @@ from __future__ import annotations import os import pathlib import platform -import runpy import sys import tarfile import zipfile +from dmgbuild.__main__ import main as dmg_main + from comictaggerlib.ctversion import __version__ @@ -78,9 +79,9 @@ if __name__ == "__main__": "-s", str(pathlib.Path(__file__).parent / "dmgbuild.conf"), f"{app} {__version__}", - f"{final_name}.dmg", + f"dist/{final_name}.dmg", ] - runpy.run_module("dmgbuild", alter_sys=True) + dmg_main() elif platform.system() == "Windows": Zip(zip_file, path) else: diff --git a/setup.cfg b/setup.cfg index c1ef328..cb45433 100644 --- a/setup.cfg +++ b/setup.cfg @@ -234,7 +234,6 @@ depends = pypi-upload deps = pyinstaller>=5.6.2,!=6.0.0 - dmgbuild extras = all commands = @@ -280,6 +279,8 @@ depends = wheel pyinstaller appimage +deps = + dmgbuild commands = python ./build-tools/zip_artifacts.py