diff --git a/installer/build.py b/installer/build.py index 5593270..cb9fe8e 100644 --- a/installer/build.py +++ b/installer/build.py @@ -7,12 +7,16 @@ """ from pathlib import Path import sys -from subprocess import run, check_output +import subprocess +from functools import wraps +import logging import tempfile import importlib.util as iutil import shutil import argparse +logging.basicConfig(encoding="utf-8", level=logging.INFO) + REPO_ROOT = Path(__file__).parent.parent DESTINATION = REPO_ROOT / "dist" INSTALLER_REQUIREMENTS_FILE = Path(__file__).parent / "inst-requirements.txt" @@ -31,8 +35,9 @@ format=bundled [Include] -pypi_wheels= PyQt5==5.15.2 - PyQt5-sip==12.8.1 +pypi_wheels= + pyqt5==5.15.4 + pyqt5-sip==12.8.1 packages= {packages} [Build] @@ -51,6 +56,16 @@ default=None, ) +@wraps(subprocess.run) +def run(cmd, *args, **kwargs): + logging.info("Running " + cmd) + return subprocess.run(cmd, *args, **kwargs) + +@wraps(subprocess.check_output) +def check_output(cmd, *args, **kwargs): + logging.info("Checking output of " + cmd) + return subprocess.check_output(cmd, *args, **kwargs) + def importable_name(pkg): """ @@ -129,6 +144,7 @@ def generate_pynsist_config(python_exe, filename, exe_name): run(f"python -m venv {work_dir} --upgrade --upgrade-deps --copies") env_python = work_dir / "Scripts" / "python.exe" + run(f"{env_python} -m pip install --upgrade --force-reinstall setuptools --no-warn-script-location") run(f"{env_python} -m pip install --upgrade wheel --no-warn-script-location") run(f"{env_python} -m pip install {REPO_ROOT} --no-warn-script-location") diff --git a/installer/inst-requirements.txt b/installer/inst-requirements.txt index c182e82..de958a2 100644 --- a/installer/inst-requirements.txt +++ b/installer/inst-requirements.txt @@ -1 +1,3 @@ -pynsist >= 2, <3 \ No newline at end of file +pynsist >= 2, <3 +pyqt5 >= 5.12 +pyqt5-sip >= 12 \ No newline at end of file