From 3584adf32d81552df56abfaac36b8f96dbb7c2cd Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 6 Jan 2025 21:25:47 +0000 Subject: [PATCH] Dynamic Python version for Zenmap build --- zenmap/install_scripts/windows/build.sh | 26 +------------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/zenmap/install_scripts/windows/build.sh b/zenmap/install_scripts/windows/build.sh index 5283ae1a4..79ab5fe56 100644 --- a/zenmap/install_scripts/windows/build.sh +++ b/zenmap/install_scripts/windows/build.sh @@ -6,37 +6,13 @@ set -e export MSYS2_ARG_CONV_EXCL="" BUILDDIR=dist -: << '#MULTILINE_COMMENT' -# Setup environment -pacman -S --needed git zip mingw-w64-x86_64-{python3,gcc,nsis,binutils} -pacman -S --needed mingw-w64-x86_64-python3-pip -git clone https://github.com/achadwick/styrene.git -git apply < [^-]+ - \d+ ) - - any - [.]pkg[.]tar -- (?: [.](?:gz|xz) )? -+ (?: [.](?:gz|xz|zst) )? - $ - ''' - keyobj = functools.cmp_to_key(self._vercmp) -EOF -cd styrene -pip3 install . -#MULTILINE_COMMENT - # make the zenmap package #makepkg-mingw -RdfL # make the minimal msys2 environment #styrene -p . -o "$BUILDDIR" styrene.cfg --no-exe --no-zip -PYTHON_VER=3.11 +PYTHON_VER=$(python -c 'from sys import version_info as v;print("%d.%d"%v[0:2])') PACKAGEDIR=$BUILDDIR/zenmap-w64/mingw64 PYTHON_SUBDIR=lib/python$PYTHON_VER PYTHONLIB=$PACKAGEDIR/$PYTHON_SUBDIR