...
 
Commits (5)
    https://gitcode.net/opencv/opencv-python/-/commit/46d2ddf7753634ee367a86b89f27835a46c5e284 Temporary hack to fix build regression with Scikit-build 0.17.3 and newer. 2023-05-30T10:43:22+03:00 Alexander Smorkalov alexander.smorkalov@xperience.ai https://gitcode.net/opencv/opencv-python/-/commit/ccb99df7e28442188ac02d4ed9631b214dfb36de Merge pull request #852 from asmorkalov:as/ci_check 2023-05-31T15:27:06+03:00 Alexander Smorkalov 2536374+asmorkalov@users.noreply.github.com Temporary hack to cover Scikit-build 0.17.3 and newer https://gitcode.net/opencv/opencv-python/-/commit/ad3e75936fe5a2a04a7fd0f85bf5bbf820c7e605 Force python3 in build procedure to generate python stubs. 2023-05-31T15:27:50+03:00 Alexander Smorkalov alexander.smorkalov@xperience.ai https://gitcode.net/opencv/opencv-python/-/commit/45e535e34d3dc21cd4b798267bfa94ee7c61e11c Fix: numpy version for python 3.11 (#839) 2023-05-31T15:28:54+03:00 Tom Sweeting info@tomsweeting.com Fix for issue #835 I encountered the same issue today. By updating to require numpy 1.24.3 I was about to build successfully for my environment (python 3.11.3 / macos ventura arm64 / gstreamer support enabled) https://gitcode.net/opencv/opencv-python/-/commit/474a1cc0ebf2086c596b60c050a9e1af658ff380 Merge pull request #849 from asmorkalov/as/python3_for_build 2023-06-01T09:40:35+03:00 Alexander Smorkalov 2536374+asmorkalov@users.noreply.github.com Force python3 in build procedure to generate python typing stubs
......@@ -10,5 +10,5 @@ requires = [
"numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
"numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'",
"numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'",
"numpy==1.22.0; python_version>='3.11'"
"numpy==1.23.2; python_version>='3.11'"
]
......@@ -32,13 +32,18 @@ def main():
'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"',
'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"',
'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"',
"numpy>=1.22.0; python_version>='3.11'"
"numpy>=1.23.5; python_version>='3.11'"
]
python_version = cmaker.CMaker.get_python_version()
python_lib_path = (cmaker.CMaker.get_python_library(python_version) or "").replace(
"\\", "/"
)
python_lib_path = cmaker.CMaker.get_python_library(python_version) or ""
# HACK: For Scikit-build 0.17.3 and newer that returns None or empty sptring for PYTHON_LIBRARY in manylinux2014
# 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.
# TODO: Remove the hack when the issue is handled correctly in main OpenCV CMake.
if python_lib_path == "":
python_lib_path = "libpython%sm.a" % python_version
python_lib_path = python_lib_path.replace("\\", "/")
python_include_dir = cmaker.CMaker.get_python_include_dir(python_version).replace(
"\\", "/"
)
......@@ -157,6 +162,7 @@ def main():
+ [
# skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
"-DPYTHON3_EXECUTABLE=%s" % sys.executable,
"-DPYTHON_DEFAULT_EXECUTABLE=%s" % sys.executable,
"-DPYTHON3_INCLUDE_DIR=%s" % python_include_dir,
"-DPYTHON3_LIBRARY=%s" % python_lib_path,
"-DBUILD_opencv_python3=ON",
......