Skip to content

Commit

Permalink
Fix Python Source RelPath for PY_LIMITED_API=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanwenchen authored Jun 14, 2024
1 parent 3276dc6 commit a38f3d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ def main():
# In Windows, in python/X.Y/<arch>/; in Linux, in just python/X.Y/.
# Naming conventions vary so widely between versions and OSes
# had to give up on checking them.
# If not specifying PY_LIMITED_API, the Python sources go under python/cv2/python-3.MINOR_VERSION/ instead of python/cv2/python-3/
[
r"python/cv2/python-%s/cv2.*"
r"python/cv2/python-%s*/cv2.*"
% (sys.version_info[0]) if 'CMAKE_ARGS' in os.environ and "-DPYTHON3_LIMITED_API=ON" in os.environ['CMAKE_ARGS']
else r"python/cv2/python-%s.*/cv2.*"
% (sys.version_info[0])
]
+
Expand Down

0 comments on commit a38f3d1

Please sign in to comment.