Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cca2a16

Browse filesBrowse files
authored
Only patch when called with "bdist_wheel"
"pip wheel" will call setup.py multiple times, so we should only run "patch" once when setup.py is called with "bdist_wheel".
1 parent 3575544 commit cca2a16
Copy full SHA for cca2a16

File tree

1 file changed

+4
-2
lines changed
Filter options

1 file changed

+4
-2
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def main():
148148
# https://github.com/skvark/opencv-python/issues/21
149149
cmake_args.append("-DCMAKE_CXX_FLAGS=-stdlib=libc++")
150150
cmake_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9")
151-
subprocess.check_call("patch -p1 < patches/patchQtPlugins", shell=True)
151+
if "bdist_wheel" in sys.argv:
152+
subprocess.check_call("patch -p1 < patches/patchQtPlugins", shell=True)
152153

153154
if sys.platform.startswith('linux'):
154155
cmake_args.append("-DWITH_IPP=OFF") # tests fail with IPP compiled with
@@ -157,7 +158,8 @@ def main():
157158
if sys.platform.startswith('linux') and not x64:
158159
cmake_args.append("-DCMAKE_CXX_FLAGS=-U__STRICT_ANSI__")
159160
# patch openEXR when building on i386, see: https://github.com/openexr/openexr/issues/128
160-
subprocess.check_call("patch -p0 < patches/patchOpenEXR", shell=True)
161+
if "bdist_wheel" in sys.argv:
162+
subprocess.check_call("patch -p0 < patches/patchOpenEXR", shell=True)
161163

162164

163165
if 'CMAKE_ARGS' in os.environ:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.