From b557ca58a461ff631babf822f6b2f14e3a312123 Mon Sep 17 00:00:00 2001 From: Leo Gordon Date: Mon, 8 Feb 2021 09:52:01 +0000 Subject: [PATCH] parse the package version from version.py (see README.txt on how to deal with older versions) --- soft/lib.python.cv2/.cm/meta.json | 4 ++-- soft/lib.python.cv2/README.txt | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 soft/lib.python.cv2/README.txt diff --git a/soft/lib.python.cv2/.cm/meta.json b/soft/lib.python.cv2/.cm/meta.json index b4070056..4ab4f08c 100644 --- a/soft/lib.python.cv2/.cm/meta.json +++ b/soft/lib.python.cv2/.cm/meta.json @@ -8,8 +8,8 @@ "win": 5 }, "soft_file_universal": "cv2$#sep#$__init__.py", - "detect_version_externally": "yes", - "version_variable_name": "__version__" + "version_module_name": "version", + "version_variable_name": "opencv_version" }, "soft_name": "Python OpenCV library", "tags": [ diff --git a/soft/lib.python.cv2/README.txt b/soft/lib.python.cv2/README.txt new file mode 100644 index 00000000..a58455f8 --- /dev/null +++ b/soft/lib.python.cv2/README.txt @@ -0,0 +1,14 @@ +Supported automatic version detection starts from 4.3.0.38 onwards. + + +If you need to detect an earlier version, please create a version.py file +in the corresponding cv2/ directory with a single line: +------------->8--cut-here--8<----------- +opencv_version = "x.y.z.p" +------------->8--cut-here--8<----------- +where x.y.z.p is your desired version. + + +When installing older OpenCV versions please use --force_version: + ck install package --tags=lib,python-package,cv2 --force_version=4.0.0.21 +This will skip version detection.