Content-Length: 267335 | pFad | http://github.com/opencv/opencv-python/commit/46d2ddf7753634ee367a86b89f27835a46c5e284

C3 Temporary hack to fix build regression with Scikit-build 0.17.3 and n… · opencv/opencv-python@46d2ddf · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 46d2ddf

Browse files
committedMay 30, 2023
Temporary hack to fix build regression with Scikit-build 0.17.3 and newer.
1 parent 0ba2c80 commit 46d2ddf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
 

‎setup.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ def main():
3636
]
3737

3838
python_version = cmaker.CMaker.get_python_version()
39-
python_lib_path = (cmaker.CMaker.get_python_library(python_version) or "").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
)

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/opencv/opencv-python/commit/46d2ddf7753634ee367a86b89f27835a46c5e284

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy