From cde29caf419c5a18bb33759b1c8d016ec7814e36 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 10:43:09 -0700 Subject: [PATCH 01/10] Fix to add pyqt5 to python environment --- appveyor.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 18fb46f..46acd0d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,14 @@ image: - Visual Studio 2015 +platform: + - x64 + environment: matrix: - - PYTHON: "C:\\Python36" + - PYTHON_VERSION: "3.6" + PIP_DEPENDENCIES: "pyqt5" + PIP_DEPENDENCIES_FLAGS: "-q" MSVC_VERSION: "Visual Studio 10 Win64" TWINE_USERNAME: rp @@ -22,7 +27,7 @@ install: - git clone http://www.github.com/lbl-camera/Xi-cam.core - git clone http://www.github.com/lbl-camera/Xi-cam.plugins - git clone http://www.github.com/lbl-camera/Xi-cam.gui - - pip install PyQt5 + #- pip install PyQt5 - pip install Xi-cam.core/ - pip install Xi-cam.plugins/ - pip install Xi-cam.gui/ @@ -32,7 +37,7 @@ install: - pyinstaller Xi-cam/Xi-cam.spec -build: off +build: false artifacts: - path: dist\* From 254437dd27c47dc5240cedd119f10d616a7b7353 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 10:53:42 -0700 Subject: [PATCH 02/10] Revert change to appveyor python env --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 46acd0d..1b4fea5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ platform: environment: matrix: - - PYTHON_VERSION: "3.6" + - PYTHON: "C:\\Python36" PIP_DEPENDENCIES: "pyqt5" PIP_DEPENDENCIES_FLAGS: "-q" MSVC_VERSION: "Visual Studio 10 Win64" From 58975fc29e09e20780295fada435551121ff707a Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:30:12 -0700 Subject: [PATCH 03/10] update python env to 3.7 x64 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1b4fea5..c0aaf04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ platform: environment: matrix: - - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python37-x64" PIP_DEPENDENCIES: "pyqt5" PIP_DEPENDENCIES_FLAGS: "-q" MSVC_VERSION: "Visual Studio 10 Win64" From 44f91a793a20bb7515a3f13b22a6ce0e03122cef Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:30:54 -0700 Subject: [PATCH 04/10] Do pyqt5 install first to test early --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c0aaf04..9409aca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,7 @@ cache: - '%LOCALAPPDATA%\pip\Cache\wheels' install: + - pip install PyQt5 - cp "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install pyinstaller" @@ -27,7 +28,6 @@ install: - git clone http://www.github.com/lbl-camera/Xi-cam.core - git clone http://www.github.com/lbl-camera/Xi-cam.plugins - git clone http://www.github.com/lbl-camera/Xi-cam.gui - #- pip install PyQt5 - pip install Xi-cam.core/ - pip install Xi-cam.plugins/ - pip install Xi-cam.gui/ From f04825c14f2292a20b6d2e2c8ba81ede5321b7f3 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:45:14 -0700 Subject: [PATCH 05/10] Trying pinned pyqt5 version --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9409aca..3fd72bb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ cache: - '%LOCALAPPDATA%\pip\Cache\wheels' install: - - pip install PyQt5 + - pip install PyQt5==5.12.3 - cp "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install pyinstaller" From 63da5486cf63d82adfa3083eac85a572b03ac65f Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:48:07 -0700 Subject: [PATCH 06/10] Trying explicit wheel install --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3fd72bb..df3ab30 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ cache: - '%LOCALAPPDATA%\pip\Cache\wheels' install: - - pip install PyQt5==5.12.3 + - pip install https://files.pythonhosted.org/packages/f7/ee/3e5dafdbdf6b35649bd471122e78cab9ae937986586528d247d1f8173007/PyQt5-5.12.3-5.12.4-cp35.cp36.cp37.cp38-none-win_amd64.whl - cp "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install pyinstaller" From 426dc09859b70e8ef9fa7939ef48d8a25366fab8 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:50:28 -0700 Subject: [PATCH 07/10] Trying explicit path to python bin --- appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index df3ab30..8627a0a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ cache: - '%LOCALAPPDATA%\pip\Cache\wheels' install: - - pip install https://files.pythonhosted.org/packages/f7/ee/3e5dafdbdf6b35649bd471122e78cab9ae937986586528d247d1f8173007/PyQt5-5.12.3-5.12.4-cp35.cp36.cp37.cp38-none-win_amd64.whl + - "%PYTHON%\\python.exe -m pip install PyQt5" - cp "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h" - "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel" - "%PYTHON%\\python.exe -m pip install pyinstaller" @@ -28,11 +28,11 @@ install: - git clone http://www.github.com/lbl-camera/Xi-cam.core - git clone http://www.github.com/lbl-camera/Xi-cam.plugins - git clone http://www.github.com/lbl-camera/Xi-cam.gui - - pip install Xi-cam.core/ - - pip install Xi-cam.plugins/ - - pip install Xi-cam.gui/ - - pip install Xi-cam/ - - pip list + - "%PYTHON%\\python.exe -m pip install Xi-cam.core/" + - "%PYTHON%\\python.exe -m pip install Xi-cam.plugins/" + - "%PYTHON%\\python.exe -m pip install Xi-cam.gui/" + - "%PYTHON%\\python.exe -m pip install Xi-cam/" + - "%PYTHON%\\python.exe -m pip install list" # - build.bat - pyinstaller Xi-cam/Xi-cam.spec From 09e3cc3841dde39daf6d3ac48c0eda53595584f2 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:57:06 -0700 Subject: [PATCH 08/10] Fix pyinstaller path --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8627a0a..a6f3ce5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,7 +34,7 @@ install: - "%PYTHON%\\python.exe -m pip install Xi-cam/" - "%PYTHON%\\python.exe -m pip install list" # - build.bat - - pyinstaller Xi-cam/Xi-cam.spec + - "%PYTHON%\\Scripts\\pyinstaller.exe Xi-cam/Xi-cam.spec build: false From e6a1d4b05f1eea3f268f8c250be555da986b02f6 Mon Sep 17 00:00:00 2001 From: Ronald Pandolfi Date: Tue, 2 Jul 2019 11:57:57 -0700 Subject: [PATCH 09/10] Syntax fix --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a6f3ce5..6934e59 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,7 +34,7 @@ install: - "%PYTHON%\\python.exe -m pip install Xi-cam/" - "%PYTHON%\\python.exe -m pip install list" # - build.bat - - "%PYTHON%\\Scripts\\pyinstaller.exe Xi-cam/Xi-cam.spec + - "%PYTHON%\\Scripts\\pyinstaller.exe Xi-cam/Xi-cam.spec" build: false From 602ede1980a18c6bf8c46a1e16e6599d2c8d09a8 Mon Sep 17 00:00:00 2001 From: ronpandolfi Date: Tue, 2 Jul 2019 19:30:50 -0700 Subject: [PATCH 10/10] Fix data paths for build --- Xi-cam.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Xi-cam.spec b/Xi-cam.spec index c096da6..9bdd43d 100644 --- a/Xi-cam.spec +++ b/Xi-cam.spec @@ -1,4 +1,5 @@ # -*- mode: python -*- +# Usage: pyinstall --path=C:\Windows\System32\downlevel Xi-cam.spec import glob, os import distributed @@ -15,7 +16,7 @@ import PyQt5 block_cipher = None from xicam.gui import static -datas_src = glob.glob(os.path.join(static.__path__[0],'**/*.*'), recursive=True) +datas_src = [path for path in glob.glob(os.path.join(static.__path__[0],'**/*.*'), recursive=True) if '__init__.py' not in path] datas_dst = [os.path.dirname(os.path.relpath(path,static.__path__[0])) for path in datas_src] datas_src.append(os.path.join(distributed.__path__[0],'distributed.yaml')) @@ -41,15 +42,12 @@ pluginmanager.collectPlugins(paths=[xicam.core.__path__[0],xicam.plugins.__path_ plugins = pluginmanager.getAllPlugins() datas_src.extend([plugin.path for plugin in plugins]) datas_dst.extend(['plugins']*len(plugins)) -markerfiles = glob.glob('../**/*.yapsy-plugin', recursive=True) + +markerfiles = list(map(os.path.abspath, glob.glob('**/*.yapsy-plugin', recursive=True))) datas_src.extend(markerfiles) datas_dst.extend(['plugins']*len(markerfiles)) -print('datas:') -for data in zip(datas_dst, datas_src): - print(data) - a = Analysis(['run_xicam.py'], pathex=['C:\\Users\\rp\\PycharmProjects\\Xi-cam'], binaries=[],