From 5bb21cab218af01faf1f1338450c60b48ae7f875 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 23 Mar 2023 13:15:00 +0000 Subject: [PATCH 01/11] Try Qt6 --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0c43de5..9968b15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ git+https://github.com/pyinstaller/pyinstaller ipykernel<6 # Install old version of ipykernel to avoid terminal issues -glue-core==1.7.0 +glue-core==1.8.0 glue-vispy-viewers==1.0.7 glue-wwt==0.6.1 glue-plotly==0.4.0 -pvextractor -pywwt +pvextractor==0.3 +pywwt==0.19.0 notebook numpy<1.22 astropy<5.0 -PyQt5==5.14.2 -PyQtWebEngine==5.14.0 +PyQt6==6.4.2 +PyQt6-WebEngine==6.4.0 From 52806b27714388721644ccb02007a15245354e0f Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 23 Mar 2023 14:58:02 +0000 Subject: [PATCH 02/11] Update glue-core to 1.8.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9968b15..d3d1e2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ git+https://github.com/pyinstaller/pyinstaller ipykernel<6 # Install old version of ipykernel to avoid terminal issues -glue-core==1.8.0 +glue-core==1.8.1 glue-vispy-viewers==1.0.7 glue-wwt==0.6.1 glue-plotly==0.4.0 From 4fcd191684fce53cb761ddfd5c13a432a116c04f Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 23 Mar 2023 15:01:28 +0000 Subject: [PATCH 03/11] Python 3.11 --- .github/workflows/build_stable.yml | 14 +++----------- requirements.txt | 5 +---- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index f83e8f7..d26dc90 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -14,24 +14,16 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-10.15, ubuntu-18.04, windows-2019] + os: [macos-11, windows-2019] steps: - name: Checkout code uses: actions/checkout@v2 - # Not all dependencies work correctly on Python 3.9 on Windows yet so we use - # Python 3.8 there. - - name: Set up Python 3.8 - if: matrix.os == 'windows-2019' + - name: Set up Python 3.11 uses: actions/setup-python@v2 with: - python-version: 3.8 - - name: Set up Python 3.9 - if: matrix.os != 'windows-2019' - uses: actions/setup-python@v2 - with: - python-version: 3.9 + python-version: 3.11 - name: Install Python dependencies run: pip install -r requirements.txt diff --git a/requirements.txt b/requirements.txt index d3d1e2f..a880a21 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -git+https://github.com/pyinstaller/pyinstaller -ipykernel<6 # Install old version of ipykernel to avoid terminal issues +pyinstaller glue-core==1.8.1 glue-vispy-viewers==1.0.7 glue-wwt==0.6.1 @@ -7,7 +6,5 @@ glue-plotly==0.4.0 pvextractor==0.3 pywwt==0.19.0 notebook -numpy<1.22 -astropy<5.0 PyQt6==6.4.2 PyQt6-WebEngine==6.4.0 From f69382ecb13c54af96474194789dffaa2eceac07 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Tue, 28 Mar 2023 12:27:47 +0100 Subject: [PATCH 04/11] Uninstall debugpy as it does not bundle well --- .github/workflows/build_stable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index d26dc90..6bc0af0 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -29,8 +29,8 @@ jobs: run: pip install -r requirements.txt - name: Run pyinstaller run: pyinstaller glue_app.spec - - name: Uninstall lxml - run: pip uninstall -y lxml + - name: Uninstall lxml and debugpy + run: pip uninstall -y lxml debugpuy - name: Prepare application for distribution shell: bash run: ./prepare_"$RUNNER_OS".sh ${GITHUB_REF##*/} From 0f044be7395c1d0894f075fb6a5e25b6901e9d01 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Tue, 28 Mar 2023 22:09:08 +0100 Subject: [PATCH 05/11] Fix typo in package name --- .github/workflows/build_stable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index 6bc0af0..eff17e6 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -30,7 +30,7 @@ jobs: - name: Run pyinstaller run: pyinstaller glue_app.spec - name: Uninstall lxml and debugpy - run: pip uninstall -y lxml debugpuy + run: pip uninstall -y lxml debugpy - name: Prepare application for distribution shell: bash run: ./prepare_"$RUNNER_OS".sh ${GITHUB_REF##*/} From d5e962cf220abdb3ce7b784f854dbeaef612cc8a Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 31 Mar 2023 11:58:19 +0100 Subject: [PATCH 06/11] Make sure we error correctly if make_dmg.sh fails --- osx/make_dmg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osx/make_dmg.sh b/osx/make_dmg.sh index a0acc1d..e90a7a7 100755 --- a/osx/make_dmg.sh +++ b/osx/make_dmg.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -xe mv dist/glue.app dist/"glue $1.app" rm -rf dist/start_glue From b8be095498793ff900aa80661d323a2ffdacdc93 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 31 Mar 2023 12:00:16 +0100 Subject: [PATCH 07/11] Make sure we uninstall debugpy before calling pyinstaller --- .github/workflows/build_stable.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index eff17e6..0e13f10 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -27,10 +27,12 @@ jobs: - name: Install Python dependencies run: pip install -r requirements.txt + - name: Uninstall debugpy + run: pip uninstall -y debugpy - name: Run pyinstaller run: pyinstaller glue_app.spec - - name: Uninstall lxml and debugpy - run: pip uninstall -y lxml debugpy + - name: Uninstall lxml + run: pip uninstall -y lxml - name: Prepare application for distribution shell: bash run: ./prepare_"$RUNNER_OS".sh ${GITHUB_REF##*/} From 3a8e43700fdc68e78e8dc5ef5ef08e7fdcbb38b0 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 31 Mar 2023 12:42:58 +0100 Subject: [PATCH 08/11] Include PyQt6.QtTest in hidden imports --- glue_app.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/glue_app.spec b/glue_app.spec index df3e521..1df8ba7 100644 --- a/glue_app.spec +++ b/glue_app.spec @@ -27,6 +27,7 @@ a = Analysis( "glue_wwt", "glue_plotly", "glue_statistics", + "PyQt6.QtTest" ], hookspath=["hooks"], hooksconfig={ From 1e37c865ed10d7473885a0441d748508debeebc5 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 31 Mar 2023 13:13:06 +0100 Subject: [PATCH 09/11] Remove old test command --- osx/make_dmg.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/osx/make_dmg.sh b/osx/make_dmg.sh index e90a7a7..3f2c76c 100755 --- a/osx/make_dmg.sh +++ b/osx/make_dmg.sh @@ -5,6 +5,5 @@ rm -rf dist/start_glue python osx/fix_app_qt_folder_names_for_codesign.py dist/"glue $1.app" codesign --force --deep --sign - dist/"glue $1.app" dist/"glue $1.app"/Contents/MacOS/start_glue --test -dist/glue $1.app/Contents/MacOS/start_glue --test hdiutil create -volname "Glue" -srcfolder dist -ov -format UDZO dist/"glue $1.dmg" rm -rf dist/"glue $1.app" From 0cf58535f0b7ae367125893fe62793dee2f959c2 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 31 Mar 2023 22:38:16 +0100 Subject: [PATCH 10/11] Don't use INFO logging level unless requested (otherwise it spams to Error console) --- start_glue.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/start_glue.py b/start_glue.py index 204377c..9ea067e 100644 --- a/start_glue.py +++ b/start_glue.py @@ -11,11 +11,12 @@ os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = '--ignore-gpu-blacklist' -logger.setLevel("INFO") +if __name__ == "__main__": -load_plugins() + if '--debug' in sys.argv or '--test' in sys.argv: + logger.setLevel("INFO") -if __name__ == "__main__": + load_plugins() if '--debug' in sys.argv: import faulthandler From 0a5647d7bc7e48933af393d607fa3f2306de402e Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Sat, 1 Apr 2023 08:39:27 +0100 Subject: [PATCH 11/11] Try developer version of vispy --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index a880a21..6b9a47d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ pywwt==0.19.0 notebook PyQt6==6.4.2 PyQt6-WebEngine==6.4.0 +git+https://github.com/vispy/vispy