diff --git a/.github/actions/macos-install.sh b/.github/actions/macos-install.sh index 76b38e5c..fe050fce 100755 --- a/.github/actions/macos-install.sh +++ b/.github/actions/macos-install.sh @@ -7,7 +7,7 @@ export distpath="dist/" export gampath="${distpath}gam" rm -rf $gampath export specfile="gam.spec" -$python -OO -m PyInstaller --clean --noupx --strip --distpath "${gampath}" --target-architecture $PLATFORM "${specfile}" +$python -OO -m PyInstaller --distpath "${gampath}" "${specfile}" export gam="${gampath}/gam" $gam version extended export GAMVERSION=`$gam version simple` diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18fbf9c7..7b5ef5ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ env: MIN_OPENSSL_VERSION: "1.1.1l" PATCHELF_VERSION: "0.13" # PYINSTALLER_VERSION can be full commit hash or version like v4.20 - PYINSTALLER_VERSION: "6eae2c7cf93a968ddc054339e0cb3063f90d0e64" + PYINSTALLER_VERSION: "41842f5ad31dd33d7ba4ae03daace2287c80dcb7" jobs: build: @@ -161,14 +161,19 @@ jobs: echo "pip=$pip" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV echo -e "Python: $python\nPip: $pip\nLD_LIB...: $LD_LIBRARY_PATH" - $pip install --upgrade pip - $pip install wheel + if [ $GAMOS == "macos" ]; then + #export pipoptions='--no-binary ":all:"' + export MACOSX_DEPLOYMENT_TARGET="10.9" + export CFLAGS="-arch arm64 -arch x86_64" + fi + $pip install --upgrade pip $pipoptions + $pip install wheel $pipoptions export url="https://codeload.github.com/pyinstaller/pyinstaller/tar.gz/${PYINSTALLER_VERSION}" echo "Downloading ${url}" curl -o pyinstaller.tar.gz --compressed "${url}" tar xf pyinstaller.tar.gz cd "pyinstaller-${PYINSTALLER_VERSION}/" - if [ $GAMOS == "windows" ]; then + if [ $GAMOS != "linux" ]; then # remove pre-compiled bootloaders so we fail if bootloader compile fails rm -rf PyInstaller/bootloader/*bit cd bootloader @@ -188,9 +193,13 @@ jobs: if: matrix.os != 'self-hosted' run: | set +e - $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U --force-reinstall - - $pip install --upgrade -r requirements.txt + if [ $GAMOS == "macos" ]; then + #export pipoptions='--no-binary ":all:"' + export MACOSX_DEPLOYMENT_TARGET="10.9" + export CFLAGS="-arch arm64 -arch x86_64" + fi + $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U --force-reinstall $pipoptions + $pip install --upgrade -r requirements.txt $pipoptions - name: Build GAM with PyInstaller if: matrix.goal != 'test' diff --git a/README.md b/README.md index efc4bdaa..cd40a64e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -GAM is a command line tool for Google Workspace (fka G Suite) Administrators to manage domain and user settings quickly and easily. +GAM is a command line tool for Google Workspace admins to manage domain and user settings quickly and easily. ![Build Status](https://github.com/jay0lee/GAM/workflows/Build%20and%20test%20GAM/badge.svg) @@ -14,14 +14,6 @@ bash <(curl -s -S -L https://git.io/install-gam) this will download GAM, install it and start setup. -To install with `pip`, run - -```sh -pip install git+https://github.com/jay0lee/GAM.git#subdirectory=src -``` - -This will only download and install GAM. To start setup, simply invoke the `gam` CLI. - ## Windows Download the MSI Installer from the [GitHub Releases] page. Install the MSI and you'll be prompted to setup GAM. diff --git a/src/gam.spec b/src/gam.spec index 64f418c5..8d5bbcaf 100644 --- a/src/gam.spec +++ b/src/gam.spec @@ -33,6 +33,11 @@ for d in a.datas: pyz = PYZ(a.pure) +if sys.platform == "darwin": + target_arch="universal2" +else: + target_arch=None + exe = EXE(pyz, a.scripts, a.binaries, @@ -42,4 +47,5 @@ exe = EXE(pyz, debug=False, strip=None, upx=False, + target_arch=target_arch, console=True) diff --git a/src/gam/var.py b/src/gam/var.py index 9a83ab76..3b5a4af6 100644 --- a/src/gam/var.py +++ b/src/gam/var.py @@ -8,7 +8,7 @@ import platform import re GAM_AUTHOR = 'Jay Lee ' -GAM_VERSION = '6.10' +GAM_VERSION = '6.11' GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' GAM_URL = 'https://git.io/gam'