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 53e5ed3

Browse filesBrowse files
authored
Merge pull request opencv#580 from jreese/patch-1
Use PEP-508 compliant dependency specifiers
2 parents 053e8cc + e7ce051 commit 53e5ed3
Copy full SHA for 53e5ed3

File tree

Expand file treeCollapse file tree

1 file changed

+10
-21
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-21
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+10-21Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,15 @@ def main():
2222
build_headless = get_build_env_var_by_name("headless")
2323
build_java = "ON" if get_build_env_var_by_name("java") else "OFF"
2424

25-
if sys.version_info[:2] >= (3, 6):
26-
minimum_supported_numpy = "1.13.3"
27-
if sys.version_info[:2] >= (3, 7):
28-
minimum_supported_numpy = "1.14.5"
29-
if sys.version_info[:2] >= (3, 8):
30-
minimum_supported_numpy = "1.17.3"
31-
if sys.version_info[:2] >= (3, 9):
32-
minimum_supported_numpy = "1.19.3"
33-
if sys.version_info[:2] >= (3, 10):
34-
minimum_supported_numpy = "1.21.2"
35-
36-
# linux arm64 is a special case
37-
if sys.platform.startswith("linux") and sys.version_info[:2] >= (3, 6) and platform.machine() == "aarch64":
38-
minimum_supported_numpy = "1.19.3"
39-
40-
# macos arm64 is a special case
41-
if sys.platform == "darwin" and sys.version_info[:2] >= (3, 6) and platform.machine() == "arm64":
42-
minimum_supported_numpy = "1.21.0"
43-
44-
numpy_version = "numpy>=%s" % minimum_supported_numpy
25+
install_requires = [
26+
'numpy>=1.13.3; python_version<"3.7"',
27+
'numpy>=1.14.5; python_version>="3.7"',
28+
'numpy>=1.17.3; python_version>="3.8"',
29+
'numpy>=1.19.3; python_version>="3.9"',
30+
'numpy>=1.21.2; python_version>="3.10"',
31+
'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"',
32+
'numpy>=1.21.2; python_version>="3.6" and platform_system=="Darwin" and platform_machine=="arm64"',
33+
]
4534

4635
python_version = cmaker.CMaker.get_python_version()
4736
python_lib_path = cmaker.CMaker.get_python_library(python_version).replace(
@@ -257,7 +246,7 @@ def main():
257246
package_data=package_data,
258247
maintainer="Olli-Pekka Heinisuo",
259248
ext_modules=EmptyListWithLength(),
260-
install_requires=numpy_version,
249+
install_requires=install_requires,
261250
python_requires=">=3.6",
262251
classifiers=[
263252
"Development Status :: 5 - Production/Stable",

0 commit comments

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