From b54a3959d9a34f372fc424961d0ebd3b100ce8d8 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 26 Mar 2020 02:58:08 -0700 Subject: [PATCH] Travis cleanup (#1128) * Travis cleanup * Travis window cleanup, make consistent --- src/travis/osx-x86_64-before-install.sh | 5 ++-- src/travis/windows-x86-before-install.sh | 27 +++++++++------------ src/travis/windows-x86_64-before-install.sh | 8 +----- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/travis/osx-x86_64-before-install.sh b/src/travis/osx-x86_64-before-install.sh index 1bc3591f..3d550c7f 100755 --- a/src/travis/osx-x86_64-before-install.sh +++ b/src/travis/osx-x86_64-before-install.sh @@ -1,5 +1,8 @@ mypath=$HOME whereibelong=$(pwd) +cpucount=$(sysctl -n hw.ncpu) +echo "This device has $cpucount CPUs for compiling..." + #echo "Brew installing xz..." #brew install xz > /dev/null @@ -44,8 +47,6 @@ export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib export openssl=~/ssl/bin/openssl export python=~/python/bin/python3 export pip=~/python/bin/pip3 -cpucount=$(nproc --all) -echo "This device has $cpucount CPUs for compiling..." SSLVER=$($openssl version) SSLRESULT=$? PYVER=$($python -V) diff --git a/src/travis/windows-x86-before-install.sh b/src/travis/windows-x86-before-install.sh index 2db5ed6d..207fb76a 100755 --- a/src/travis/windows-x86-before-install.sh +++ b/src/travis/windows-x86-before-install.sh @@ -1,19 +1,7 @@ echo "Installing Net-Framework-Core..." export mypath=$(pwd) -cd ~ until powershell Install-WindowsFeature Net-Framework-Core; do echo "trying again..."; done -#cinst -y --forcex86 python3 -export python_file=python-$BUILD_PYTHON_VERSION.exe -wget --quiet https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$python_file -powershell ".\\${python_file} /quiet InstallAllUsers=1 TargetDir=c:\\python" -until cinst -y wixtoolset; do echo "trying again..."; done -export PATH=$PATH:/c/python/scripts -cd $mypath -export python=/c/python/python.exe -export pip=/c/python/scripts/pip.exe -until [ -f $python ]; do :; done -until [ -f $pip ]; do :; done - +cd ~ export exefile=Win32OpenSSL_Light-${BUILD_OPENSSL_VERSION//./_}.exe if [ ! -e $exefile ]; then echo "Downloading $exefile..." @@ -21,20 +9,29 @@ if [ ! -e $exefile ]; then fi echo "Installing $exefile..." powershell ".\\${exefile} /silent /sp- /suppressmsgboxes /DIR=C:\\ssl" +export python_file=python-$BUILD_PYTHON_VERSION.exe +wget --quiet https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$python_file +powershell ".\\${python_file} /quiet InstallAllUsers=1 TargetDir=c:\\python" +until cinst -y wixtoolset; do echo "trying again..."; done until cp -v /c/ssl/libcrypto-1_1.dll /c/python/DLLs/libcrypto-1_1.dll; do echo "trying again..."; done until cp -v /c/ssl/libssl-1_1.dll /c/python/DLLs/libssl-1_1.dll; do echo "trying again..."; done +export PATH=$PATH:/c/python/scripts +cd $mypath +export python=/c/python/python.exe +export pip=/c/python/scripts/pip.exe +until [ -f $python ]; do :; done +until [ -f $pip ]; do :; done $pip install --upgrade pip $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U $pip install --upgrade -r src/requirements.txt - #$pip install --upgrade pyinstaller # Install PyInstaller from source and build bootloader # to try and avoid getting flagged as malware since # lots of malware uses PyInstaller default bootloader # https://stackoverflow.com/questions/53584395/how-to-recompile-the-bootloader-of-pyinstaller echo "Downloading PyInstaller..." -wget --quiet https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz +wget --quiet https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz tar xf develop.tar.gz cd pyinstaller-develop/bootloader echo "bootloader before:" diff --git a/src/travis/windows-x86_64-before-install.sh b/src/travis/windows-x86_64-before-install.sh index 7df3f0a7..d690f8bf 100755 --- a/src/travis/windows-x86_64-before-install.sh +++ b/src/travis/windows-x86_64-before-install.sh @@ -9,8 +9,6 @@ if [ ! -e $exefile ]; then fi echo "Installing $exefile..." powershell ".\\${exefile} /silent /sp- /suppressmsgboxes /DIR=C:\\ssl" -#cup -y chocolatey -#cinst -y python3 export python_file=python-$BUILD_PYTHON_VERSION-amd64.exe wget --quiet https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$python_file powershell ".\\${python_file} /quiet InstallAllUsers=1 TargetDir=c:\\python" @@ -33,11 +31,8 @@ $pip install --upgrade -r src/requirements.txt # lots of malware uses PyInstaller default bootloader # https://stackoverflow.com/questions/53584395/how-to-recompile-the-bootloader-of-pyinstaller echo "Downloading PyInstaller..." -#wget --quiet https://github.com/pyinstaller/pyinstaller/releases/download/v$PYINSTALLER_VERSION/PyInstaller-$PYINSTALLER_VERSION.tar.gz wget --quiet https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz -#tar xf PyInstaller-$PYINSTALLER_VERSION.tar.gz tar xf develop.tar.gz -#cd PyInstaller-$PYINSTALLER_VERSION/bootloader cd pyinstaller-develop/bootloader echo "bootloader before:" md5sum ../PyInstaller/bootloader/Windows-64bit/* @@ -47,6 +42,5 @@ md5sum ../PyInstaller/bootloader/Windows-64bit/* echo "PATH: $PATH" cd .. $python setup.py install -echo "cd to $mypath..." -#until cp -v /c/ssl/*.dll /c/Python37/DLLs; do echo "trying again..."; done +echo "cd to $mypath" cd $mypath