Skip to content

Commit

Permalink
Merge pull request #1000 from zhanwenchen:patch-1
Browse files Browse the repository at this point in the history
Fix Python Source RelPath for PY_LIMITED_API=OFF
  • Loading branch information
asmorkalov authored Jan 13, 2025
2 parents 4a0d4ce + 02648ce commit 9def6a5
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 @@ -118,8 +118,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 9def6a5

Please sign in to comment.