Move GAM to use Python 3. Fixes #392 (#896)

* 2to3 cleanup, import changes, httplib2 py3 version, fix passlib deprecation

* Travis Python 3 move

* default to Trusty for Python 3.7.3

* use daadsnakes PPA

* start with default python

* --yes

* 3.5 for now, may tighten in future

* compile 3.7 from source

* osx and linux

* Update linux-x86_64-before-install.sh

* pip3

* bash env, more debug

* quiet down the make

* alias

* kill virtualenv

* 2.6

* again

* again

* deactivate

* pip3

* pip3

* Update linux-x86_64-before-install.sh

* Update linux-x86_64-before-install.sh

* Update .travis.yml

* cleanup

*  give xenial a shot

* 3.7.3, trusty

* 3.7.3, xenial

* pip3

* no sudo

* StaticX for a truly static Linux build

* StaticX for realz

* Install StaticX deps

* log size and run times

* actually time

* remove old gam

* distro

* debug pyinstaller

* Fix StaticX path discovery

* Detect old glibc and install legacy GAM build

* report version

* fix

* fix distro list

* StaticX workaround

* travis staticx builds

* remove 3P libraries from GAM

These libraries can (and should) be installed via
pip install -r requirements.txt

* Have travis install reqs

* fix cacert (static for now)

* remove bad gam.spec

* fix requirements.txt location

* try another path

* deploy all branches

* win/osx fix attempts
This commit is contained in:
Jay Lee
2019-04-21 17:03:07 -04:00
committed by GitHub
parent 892d200cd2
commit 457ce15a4c
468 changed files with 6178 additions and 141349 deletions

View File

@@ -1,9 +0,0 @@
dpkg --add-architecture i386
apt update
apt install -y python:i386
python -V
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -1 +0,0 @@
linux-x86_64-install.sh

View File

@@ -1,11 +0,0 @@
sudo apt update
sudo apt -y dist-upgrade
sudo sh -c "echo 'foreign-architecture i386' > /etc/dpkg/dpkg.cfg.d/multiarch"
sudo apt update
sudo apt install -y python:i386 python2.7:i386 python2.7-minimal:i386 mime-support:i386
python -V
sudo pip install --upgrade pip
sudo pip freeze > requirements.txt
sudo pip install --upgrade -r requirements.txt
sudo rm requirements.txt
sudo pip install pyinstaller

View File

@@ -1 +0,0 @@
linux-x86_64-install.sh

15
src/travis/linux-x86_64-before-install.sh Normal file → Executable file
View File

@@ -1,5 +1,12 @@
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
echo "RUNNING: apt update..."
sudo apt-get --yes update > /dev/null
echo "RUNNING: apt dist-upgrade..."
sudo apt-get --yes dist-upgrade > /dev/null
echo "Installing StaticX deps..."
sudo apt-get --yes install binutils patchelf
echo "Upgrading pip packages..."
pip freeze > upgrades.txt
pip install --upgrade -r upgrades.txt
pip install -r src/requirements.txt
pip install pyinstaller
pip install staticx

15
src/travis/linux-x86_64-install.sh Normal file → Executable file
View File

@@ -1,5 +1,5 @@
cd src
pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec
pyinstaller --clean --debug -F --distpath=gam $GAMOS-gam.spec
gam/gam version
export GAMVERSION=`gam/gam version simple`
cp LICENSE gam
@@ -7,3 +7,16 @@ cp whatsnew.txt gam
cp GamCommands.txt gam
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.tar.xz
tar cfJ $GAM_ARCHIVE gam/
echo "PyInstaller GAM info:"
du -h gam/gam
time gam/gam version
GAM_LEGACY_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-legacy.tar.xz
staticx gam/gam gam/gam-staticx
strip gam/gam-staticx
rm gam/gam
cp staticx-gam.sh gam/gam
tar cfJ $GAM_LEGACY_ARCHIVE gam/
echo "Legacy StaticX GAM info:"
du -h gam/gam-staticx
time gam/gam version

9
src/travis/osx-x86_64-before-install.sh Normal file → Executable file
View File

@@ -1,7 +1,8 @@
brew update
brew install python@2
brew upgrade python3
export PATH=/usr/local/opt/python/libexec/bin:$PATH
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip freeze > upgrades.txt
pip install --upgrade -r upgrades.txt
pip install -r src/requirements.txt
pip install pyinstaller

View File

@@ -1 +0,0 @@
linux-x86_64-install.sh

View File

@@ -0,0 +1,9 @@
cd src
pyinstaller --clean --debug -F --distpath=gam $GAMOS-gam.spec
gam/gam version
export GAMVERSION=`gam/gam version simple`
cp LICENSE gam
cp whatsnew.txt gam
cp GamCommands.txt gam
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.tar.xz
tar cfJ $GAM_ARCHIVE gam/

View File

@@ -1,9 +0,0 @@
brew update
brew install python@2 || true
brew link --overwrite python@2
sudo pip install --upgrade pip
sudo pip freeze > requirements.txt
sudo pip install --upgrade -r requirements.txt
sudo rm requirements.txt
sudo pip install --upgrade altgraph
sudo pip install pyinstaller

View File

@@ -1 +0,0 @@
linux-x86_64-install.sh

10
src/travis/windows-x86-before-install.sh Normal file → Executable file
View File

@@ -1,9 +1,9 @@
powershell Install-WindowsFeature Net-Framework-Core
cinst -y --forcex86 python2
export PATH=$PATH:/c/Python27/scripts
cinst -y --forcex86 python3
export PATH=$PATH:/c/Python37/scripts
cinst -y wixtoolset
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip freeze > upgrades.txt
pip install --upgrade -r upgrades.txt
pip install -r src/requirements.txt
pip install pyinstaller

0
src/travis/windows-x86-install.sh Normal file → Executable file
View File

10
src/travis/windows-x86_64-before-install.sh Normal file → Executable file
View File

@@ -1,9 +1,9 @@
powershell Install-WindowsFeature Net-Framework-Core
cinst -y $CINST_ARGS python2
export PATH=$PATH:/c/Python27/scripts
cinst -y $CINST_ARGS python3
export PATH=$PATH:/c/Python37/scripts
cinst -y wixtoolset
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip freeze > upgrades.txt
pip install --upgrade -r upgrades.txt
pip install -r src/requirements.txt
pip install pyinstaller

0
src/travis/windows-x86_64-install.sh Normal file → Executable file
View File