8000 small fixes · lineCode/opencv-python@541fbdb · GitHub
[go: up one dir, main page]

Skip to content

Commit 541fbdb

Browse files
committed
small fixes
1 parent 22d4786 commit 541fbdb

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

setup.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,11 @@ def main():
7777
'cv2': ['LICENSE.txt', 'LICENSE-3RD-PARTY.txt']
7878
}
7979

80-
cmake_args = ([
80+
cmake_args = [
8181
"-G", "Visual Studio 14" + (" Win64" if x64 else '')
8282
] if os.name == 'nt' else [
8383
"-G", "Unix Makefiles" # don't make CMake try (and fail) Ninja first
84-
]) +
85-
[
84+
] + [
8685
# skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
8786
"-DPYTHON%d_EXECUTABLE=%s" % (sys.version_info[0], sys.executable),
8887
"-DBUILD_opencv_python%d=ON" % sys.version_info[0],
@@ -95,8 +94,7 @@ def main():
9594
"-DBUILD_TESTS=OFF",
9695
"-DBUILD_PERF_TESTS=OFF",
9796
"-DBUILD_DOCS=OFF"
98-
] +
99-
(["-DOPENCV_EXTRA_MODULES_PATH=" + os.path.abspath("opencv_contrib/modules")] if build_contrib else [])
97+
] + ["-DOPENCV_EXTRA_MODULES_PATH=" + os.path.abspath("opencv_contrib/modules")] if build_contrib else []
10098

10199
# OS-specific components
102100
if sys.platform == 'darwin' or sys.platform.startswith('linux'):
@@ -328,8 +326,7 @@ def get_or_install(name, version=None):
328326
# Do not import 3rd-party modules into the current process
329327
import json
330328
js_packages = json.loads(
331-
subprocess.check_output([sys.executable, "-m", "pip", "list", "--format=json"])
332-
.decode('ascii')) # valid names & versions are ASCII as per PEP 440
329+
subprocess.check_output([sys.executable, "-m", "pip", "list", "--format", "json"]).decode('ascii')) # valid names & versions are ASCII as per PEP 440
333330
try:
334331
[package] = (package for package in js_packages
335332
if package['name'] == name)

0 commit comments

Comments
 (0)
0