From 560e16668498324ec158d2e9d6380f9594b8447b Mon Sep 17 00:00:00 2001 From: Holger Badorreck Date: Mon, 3 Mar 2025 14:48:51 +0100 Subject: [PATCH 1/2] linux bugfix --- P2Pro/video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/P2Pro/video.py b/P2Pro/video.py index 512dde6..d268827 100644 --- a/P2Pro/video.py +++ b/P2Pro/video.py @@ -106,8 +106,8 @@ def open(self, cam_cmd: P2Pro_CMD.P2Pro, camera_id: Union[int, str] = -1): self.video_running = True - # On Windows, with RGB conversion turned off, OpenCV returns the image as a 2D array with size [1][]. Turn into 1D array. - if platform.system() == 'Windows': + # On Windows and Linux, with RGB conversion turned off, OpenCV returns the image as a 2D array with size [1][]. Turn into 1D array. + if platform.system() in ('Windows', 'Linux'): frame = frame[0] # split video frame (top is pseudo color, bottom is temperature data) From 4cc7ed01e64c2e5f4a757f1e80d4ac87f4297beb Mon Sep 17 00:00:00 2001 From: Holger Badorreck Date: Mon, 10 Mar 2025 12:46:43 +0100 Subject: [PATCH 2/2] pyproject.toml --- pyproject.toml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0e1b5e5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["P2Pro"] + +[project] +name = "P2Pro" +version = "0.1.0" +authors = [ +] +description = "" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: LZH License", + "Operating System :: OS Independent", +] +dependencies = [ + "ffmpeg", + "keyboard", + "opencv-python", + # pyaudio # needs compilation, so using system package is easier, e.g. python3-pyaudio for debian + "pyudev", + "pyusb", +] + +[project.urls] +"Homepage" = "http://github.com/hoba87/P2Pro-Viewer.git" +"Bug Tracker" = "http://github.com/hoba87/P2Pro-Viewer/-/issues" + +[tool.black] +line-length=100 +target-version=['py37','py38','py39','py310','py311']