From 9f439fd6c43c80e648d3d416ec80b4a88f548648 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Fri, 1 Oct 2021 17:16:32 +0200 Subject: [PATCH 1/5] Fix issue with double enumeration. The old wildcard also matched libpylon_TL_gtc.so which is a symlink to libpylon_TL_gtc-x.y.z.so. As the wheel is a zip file, the symlink was replaced with the linked file. This resulted in double enumeration of all GenTL based cameras. --- changelog.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 41a6a86..f77d9b4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Version ?.?.? longer used because distutils is deprecated in python 3.10. - setup.py: Include vcruntime140_1.dll into the package for current MVSC compiler. + - Fixed double enumeration bug on linux Version 1.7.2 - Date 2021-03-03 diff --git a/setup.py b/setup.py index fc1a40f..69400fd 100755 --- a/setup.py +++ b/setup.py @@ -626,7 +626,7 @@ class BuildSupportLinux(BuildSupport): ], "gentl": [ - ("libpylon_TL_gtc*.so", ""), + ("libpylon_TL_gtc-*.so", ""), ], "cxp": [ ], From 8ba425211a84d08e77264f6ad7d3e17f2d343d93 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Tue, 18 May 2021 17:34:23 +0200 Subject: [PATCH 2/5] Update to pylon 6.2 on windows and linux --- .appveyor.yml | 2 +- .github/workflows/main.yml | 22 ++++++++++------------ README.md | 1 - VersionInfo.py | 6 +++--- changelog.txt | 2 ++ 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 623a90a..a1c979a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -52,7 +52,7 @@ install: - 7z x swigwin.zip -oC:\ > NUL - set PATH=C:\swigwin-4.0.1;%PATH% # install pylon - - appveyor-retry curl -sSfL -o pylon_installer.exe %PYLON_DOWNLOAD_URL_BASE%Basler_pylon_6.1.1.19832.exe + - appveyor-retry curl -sSfL -o pylon_installer.exe %PYLON_DOWNLOAD_URL_BASE%Basler_pylon_6.2.0.21487.exe - pylon_installer.exe /quiet /install # PYLON_DEV_DIR is not available in the shell after installation, so we set it manually - set PYLON_DEV_DIR=%PROGRAMFILES%\Basler\pylon 6\development diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f09b078..8472a5e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,14 +30,12 @@ jobs: steps: - name: Installer list run: | - tee pylon-installer.txt < Date: Wed, 19 May 2021 11:21:00 +0200 Subject: [PATCH 3/5] adapt emulator tests to changed test images --- changelog.txt | 2 +- tests/pylon_tests/emulated/grabresulttest.py | 12 +++++++++--- tests/pylon_tests/emulated/grabtest.py | 4 +++- tests/pylon_tests/emulated/instantcameratest.py | 4 +++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/changelog.txt b/changelog.txt index 69f2c73..7092c3d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,7 +5,7 @@ Version ?.?.? - setup.py: Include vcruntime140_1.dll into the package for current MVSC compiler. - Fixed double enumeration bug on linux - - Updated to pylon 6.2 on windows and linux + - Updated to pylon 6.2 on windows and linux and adapted some tests for it. - Dropped linux x86 (32bit) support as it is no longer supported by pylon Version 1.7.2 diff --git a/tests/pylon_tests/emulated/grabresulttest.py b/tests/pylon_tests/emulated/grabresulttest.py index 4430165..019e81d 100644 --- a/tests/pylon_tests/emulated/grabresulttest.py +++ b/tests/pylon_tests/emulated/grabresulttest.py @@ -27,7 +27,9 @@ def test_emu_grabresult(self): self.assertEqual(1040, height) self.assertEqual(1024, width) self.assertEqual("B", form) - self.assertTrue(grabResult.GetArray()[0, 1] == 1) + actual = list(grabResult.Array[0:20, 0]) + expected = [actual[0] + i for i in range(20)] + self.assertEqual(actual, expected) grabResult.Release() self.assertFalse(grabResult.IsValid()) self.assertFalse(grabResult.IsUnique()) @@ -51,7 +53,9 @@ def test_copy(self): self.assertEqual(1040, height) self.assertEqual(1024, width) self.assertEqual("B", form) - self.assertTrue(grabResult.GetArray()[0, 1] == 1) + actual = list(grabResult.Array[0:20, 0]) + expected = [actual[0] + i for i in range(20)] + self.assertEqual(actual, expected) cameraGrab.Release() self.assertTrue(grabResult.IsValid()) @@ -60,7 +64,9 @@ def test_copy(self): self.assertEqual(1040, height) self.assertEqual(1024, width) self.assertEqual("B", form) - self.assertTrue(grabResult.GetArray()[0, 1] == 1) + actual = list(grabResult.Array[0:20, 0]) + expected = [actual[0] + i for i in range(20)] + self.assertEqual(actual, expected) grabResult.Release() self.assertFalse(grabResult.IsValid()) diff --git a/tests/pylon_tests/emulated/grabtest.py b/tests/pylon_tests/emulated/grabtest.py index b7d2e74..b81a176 100644 --- a/tests/pylon_tests/emulated/grabtest.py +++ b/tests/pylon_tests/emulated/grabtest.py @@ -12,7 +12,9 @@ def test_grabone(self): camera.ExposureTimeAbs.SetValue(10000.0) self.assertEqual(10000, camera.ExposureTimeAbs.GetValue()) result = camera.GrabOne(1000) - self.assertEqual(9.5, numpy.mean(result.Array[0:20, 0])) + actual = list(result.Array[0:20, 0]) + expected = [actual[0] + i for i in range(20)] + self.assertEqual(actual, expected) camera.Close() def test_grab(self): diff --git a/tests/pylon_tests/emulated/instantcameratest.py b/tests/pylon_tests/emulated/instantcameratest.py index 74da607..7dc8066 100644 --- a/tests/pylon_tests/emulated/instantcameratest.py +++ b/tests/pylon_tests/emulated/instantcameratest.py @@ -36,7 +36,9 @@ def test_grab_one(self): cam.Open() self.assertTrue(cam.GrabOne(1000)) result = cam.GrabOne(1000) - self.assertEqual(9.5, numpy.mean(result.Array[0:20, 0])) + actual = list(result.Array[0:20, 0]) + expected = [actual[0] + i for i in range(20)] + self.assertEqual(actual, expected) cam.Close() def test_grabbing(self): From d641d90ccc69a105afd9d86883ef54910751deff Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Mon, 18 Oct 2021 17:31:46 +0200 Subject: [PATCH 4/5] Fix appveor build --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a1c979a..d7c0520 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -40,10 +40,10 @@ environment: - PYTHON: "C:\\Python39-x64" install: - # Install an outdated version of readme_renderer because it is the last one with python 3.4 support (https://github.com/pypa/readme_renderer/releases/tag/25.0) + # Install an outdated version of colorama and readme_renderer because these are the last ones with python 3.4 support (https://github.com/pypa/readme_renderer/releases/tag/25.0) # Otherwise wheel/twine install fails on python 3.4 # Install setuptools >= 38.6 because this version introduced long_description_content_type which is required by current pypi - - "%PYTHON%\\python.exe -m pip install \"readme_renderer==24.0\" \"setuptools>=38.6.0\"" + - "%PYTHON%\\python.exe -m pip install \"colorama==0.4.1\" \"readme_renderer==24.0\" \"setuptools>=38.6.0\"" # We need wheel installed to build wheels - "%PYTHON%\\python.exe -m pip install wheel twine" From 725c76d2fc293937fd2fc7e6bd1b2cae536f3348 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Tue, 19 Oct 2021 09:28:55 +0200 Subject: [PATCH 5/5] Update Changelog and prepare 1.7.4rc1 --- changelog.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 7092c3d..1903d11 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,5 @@ -Version ?.?.? - - Date ????-??-?? +Version 1.7.4rc1 + - Date 2021-10-19 - setup.py: Some python2 relics have been removed and distutils is no longer used because distutils is deprecated in python 3.10. - setup.py: Include vcruntime140_1.dll into the package for current MVSC @@ -8,6 +8,9 @@ Version ?.?.? - Updated to pylon 6.2 on windows and linux and adapted some tests for it. - Dropped linux x86 (32bit) support as it is no longer supported by pylon +Version 1.7.3 + - Internal Basler release + Version 1.7.2 - Date 2021-03-03 - Fixed runtime error in binary windows releases with python 3.5 - 3.8