Skip to content

Commit

Permalink
Update opencv-python to 4.5.5.64 and restrict numpy to 1.x
Browse files Browse the repository at this point in the history
- Update due to flatpack's complaints:
  WARNING: The candidate selected for download or install
  is a yanked version: 'opencv-python' candidate
  (version 4.5.5.62 at https://files.pythonhosted.org/packages/9d/98/36bfcbff30da27dd6922ed73ca7802c37d87f77daf4c569da3dcb87b4296/opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  (from https://pypi.org/simple/opencv-python/) (requires-python:>=3.6))
  Reason for being yanked: deprecated, use 4.5.5.64

- Restrict numpy to not installing 2.x version
(due to >=1.12 version specified in requirements.txt)
which causes run-time error:
  RuntimeError: module compiled against ABI version 0x1000009
  but this version of numpy is 0x2000000

- Align installed versions between setup.py, requirements.txt, and
io.github.bcnc.json files.

Signed-off-by: Damian Wrobel <[email protected]>
  • Loading branch information
dwrobel committed Oct 4, 2024
1 parent 2541f72 commit 401f400
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bCNC/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyserial>=3.5
numpy>=1.12
numpy>=1.12,<2
Pillow>=4.0
opencv-python==4.5.5.62
opencv-python==4.5.5.64
12 changes: 6 additions & 6 deletions flatpak/io.github.bcnc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"name": "bcnc",
"buildsystem": "simple",
"build-commands": [
"pip3 install --prefix=${FLATPAK_DEST} pyserial",
"pip3 install --prefix=${FLATPAK_DEST} shxparser",
"pip3 install --prefix=${FLATPAK_DEST} svgelements",
"pip3 install --prefix=${FLATPAK_DEST} Pillow",
"pip3 install --prefix=${FLATPAK_DEST} numpy",
"pip3 install --prefix=${FLATPAK_DEST} opencv-python==4.5.5.62",
"pip3 install --prefix=${FLATPAK_DEST} pyserial>=3.5",
"pip3 install --prefix=${FLATPAK_DEST} shxparser>=0.0.2",
"pip3 install --prefix=${FLATPAK_DEST} 'svgelements>=1,<2'",
"pip3 install --prefix=${FLATPAK_DEST} Pillow>=4.0",
"pip3 install --prefix=${FLATPAK_DEST} 'numpy>=1.12,<2'",
"pip3 install --prefix=${FLATPAK_DEST} opencv-python==4.5.5.64",
"pip3 install --prefix=/app --upgrade .",
"install -p -m644 -D bCNC/bCNC.png ${FLATPAK_DEST}/share/icons/hicolor/192x192/apps/io.github.bcnc.png",
"install -p -m644 -D bCNC/bCNC.desktop ${FLATPAK_DEST}/share/applications/io.github.bcnc.desktop",
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
# (it can be installed, but does not work)
"pyserial ; sys_platform != 'win32'",
"pyserial<=3.0.1 ; sys_platform == 'win32'",
"numpy>=1.12",
"numpy>=1.12,<2",
"svgelements>=1,<2",
"shxparser>=0.0.2",
"Pillow>=4.0",
# Note there are no PyPI OpenCV packages for ARM
# (Raspberry PI, Orange PI, etc...)
"opencv-python==4.5.5.62 ; "
"opencv-python==4.5.5.64 ; "
+ "(\"arm\" not in platform_machine) and "
+ "(\"aarch64\" not in platform_machine)"
],
Expand Down

0 comments on commit 401f400

Please sign in to comment.