Skip to content

Commit

Permalink
Merge pull request vlachoudis#1488 from bosd/master
Browse files Browse the repository at this point in the history
Fix opencv-python version, with conditional formatting to point python 2.7 to the last supported version
  • Loading branch information
Harvie authored Nov 11, 2020
2 parents d264ab9 + 171b77f commit e1a764b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from setuptools import setup, find_packages

import sys #added for python2 support
print("Running bCNC setup...")

with open("README.md", "r") as fh:
long_description = fh.read()

if sys.version_info[0] >= 3:
opencv_version = '4.4.0.46' # Recent version for Puthon 3
else: #python version lower then 3 compatability
opencv_version ='4.2.0.32' # use the last opencv version for python 2.7

setup(
name = "bCNC",
version = "0.9.14.308",
Expand All @@ -27,7 +32,7 @@
"pyserial<=3.0.1 ; sys_platform == 'win32'",
'numpy>=1.12',
'Pillow>=4.0',
'opencv-python==4.2.0.32 ; ("arm" not in platform_machine) and ("aarch64" not in platform_machine)', #Note there are no PyPI OpenCV packages for ARM (Raspberry PI, Orange PI, etc...)
'opencv-python==%s ; ("arm" not in platform_machine) and ("aarch64" not in platform_machine)' % (opencv_version), #Note there are no PyPI OpenCV packages for ARM (Raspberry PI, Orange PI, etc...)
],

entry_points = {
Expand Down

0 comments on commit e1a764b

Please sign in to comment.