8000 Merge pull request #1 from opencv/4.x · opencv/opencv-python@e3a30e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit e3a30e7

Browse files
authored
Merge pull request #1 from opencv/4.x
update
2 parents 6b73d90 + 474a1cc commit e3a30e7

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

find_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
else:
6666
# local version identifier, not to be published on PyPI
6767
version = git_hash
68-
opencv_version += ".{}".format(version)
68+
opencv_version += "+{}".format(version)
6969

7070
with open("cv2/version.py", "w") as f:
7171
f.write('opencv_version = "{}"\n'.format(opencv_version))

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ requires = [
44
"scikit-build>=0.13.2",
55
"numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
66
"numpy==1.17.0; python_version=='3.7' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
7-
"numpy==1.17.3; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
7+
"numpy==1.17.5; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
88
"numpy==1.19.3; python_version<='3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
99
"numpy==1.21.0; python_version<='3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
1010
"numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
1111
"numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'",
1212
"numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'",
13-
"numpy==1.22.0; python_version>='3.11'"
13+
"numpy==1.23.2; python_version>='3.11'"
1414
]

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,18 @@ def main():
3232
'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"',
3333
'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"',
3434
'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"',
35-
"numpy>=1.22.0; python_version>='3.11'"
35+
"numpy>=1.23.5; python_version>='3.11'"
3636
]
3737

3838
python_version = cmaker.CMaker.get_python_version()
39-
python_lib_path = cmaker.CMaker.get_python_library(python_version).replace(
40-
"\\", "/"
41-
)
39+
python_lib_path = cmaker.CMaker.get_python_library(python_version) or ""
40+
# HACK: For Scikit-build 0.17.3 and newer that returns None or empty sptring for PYTHON_LIBRARY in manylinux2014
41+
# A small release related to PYTHON_LIBRARY handling changes in 0.17.2; scikit-build 0.17.3 returns an empty string from get_python_library if no Python library is present (like on manylinux), where 0.17.2 returned None, and previous versions returned a non-existent path. Note that adding REQUIRED to find_package(PythonLibs will fail, but it is incorrect (you must not link to libPython.so) and was really just injecting a non-existent path before.
42+
# TODO: Remove the hack when the issue is handled correctly in main OpenCV CMake.
43+
if python_lib_path == "":
44+
python_lib_path = "libpython%sm.a" % python_version
45+
python_lib_path = python_lib_path.replace("\\", "/")
46+
4247
python_include_dir = cmaker.CMaker.get_python_include_dir(python_version).replace(
4348
"\\", "/"
4449
)
@@ -157,6 +162,7 @@ def main():
157162
+ [
158163
# skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
159164
"-DPYTHON3_EXECUTABLE=%s" % sys.executable,
165+
"-DPYTHON_DEFAULT_EXECUTABLE=%s" % sys.executable,
160166
"-DPYTHON3_INCLUDE_DIR=%s" % python_include_dir,
161167
"-DPYTHON3_LIBRARY=%s" % python_lib_path,
162168
"-DBUILD_opencv_python3=ON",

0 commit comments

Comments
 (0)
0