Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin numpy for old numba versions #376

Merged
merged 7 commits into from
Jan 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,26 @@ def _gen_new_index_per_key(repodata, subdir, index_key):
)
_replace_pin("pandas >=1.1", "pandas >=1.3", record["depends"], record)

# fix numba / numpy compatibility; numba added a run_constrained entry
# for numpy as of version=0.54.0; numpy<1.21a0 is a conservative upper
# bound that may not be strict enough for old versions of numba
if (
record_name == "numba"
and record.get("timestamp", 0) <= 1671537177000
and pkg_resources.parse_version(record["version"]) < pkg_resources.parse_version("0.54")
):
deps = record["depends"]
for i, dep in enumerate(deps):
if dep == "numpy":
deps[i] = "numpy <1.21.0a0"
break
if dep.startswith("numpy ") and "<" in dep:
_pin_stricter(fn, record, "numpy", "x.x", "1.21")
break
if dep.startswith("numpy ") and ">" in dep:
deps[i] += ",<1.21.0a0"
break

return index


Expand Down