From 4c098b7d12fed3b4f4f5ab79d3e97b9a9b30ea8f Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Tue, 25 Apr 2023 20:14:49 -0400 Subject: [PATCH] Windows build script now automatically installs/updates package dependencies. --- PACKAGING.md | 10 ++-------- build_windows_executable.sh | 13 ++++--------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/PACKAGING.md b/PACKAGING.md index b47d761..4c334e9 100644 --- a/PACKAGING.md +++ b/PACKAGING.md @@ -4,15 +4,9 @@ An executable can only be made on a Windows host because the PyInstaller tool (h 1.) Install Python v3.11.x from https://www.python.org/. To make life easier, check the option to add Python to the PATH environment variable. -2.) Using pip, install pyinstaller, colorama, and idna: +2.) Install Cygwin (https://www.cygwin.com/). -``` - pip install -U pyinstaller colorama idna -``` - -3.) Install Cygwin (https://www.cygwin.com/). - -4.) Create the executable with: +3.) Install/update package dependencies and create the executable with: ``` $ ./build_windows_executable.sh diff --git a/build_windows_executable.sh b/build_windows_executable.sh index 6127e93..009e7fe 100755 --- a/build_windows_executable.sh +++ b/build_windows_executable.sh @@ -48,15 +48,10 @@ if [[ "$(python -V)" != "Python 3."* ]]; then exit 1 fi -# Ensure that pyinstaller is installed. -command -v pyinstaller >/dev/null 2>&1 || { echo >&2 "pyinstaller not found. Install with: 'pip install pyinstaller'"; exit 1; } - -# Ensure that the colorama module is installed. -X=$(pip show colorama 2>/dev/null) -if [[ $? != 0 ]]; then - echo "Colorama module not found. Install with: 'pip install colorama'" - exit 1 -fi +# Install/update package dependencies. +echo "Installing/updating pyinstaller, colorama, and idna packages..." +pip install -U pyinstaller colorama idna +echo # Prompt for the version to release. echo -n "Enter the version to release, using format 'vX.X.X': "