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

Fix conda-build & conda 4.11.0 incompatibility #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,25 @@ def _gen_new_index(repodata, subdir):
elif record["version"] == "0.7.14":
_replace_pin("python >=2.7", "python >=2.7,<3.10", deps, record)

if record_name == "conda-build":
# Work around vendored auxlib import error; see:
# https://github.com/conda/conda-build/issues/4333
# https://github.com/conda/conda-build/pull/4335
# https://github.com/conda-forge/conda-build-feedstock/pull/169
#
# Conda 4.11.1 should fix this upstream, so all we really need to
# do is avoid 4.11.0 specifically.
wolfv marked this conversation as resolved.
Show resolved Hide resolved
major, minor, patch = (int(v) for v in record["version"].split("."))
build_num = record['build_number']
if (major < 3 or (major == 3 and minor < 21) or
(major == 3 and minor == 21 and patch < 6) or
(major == 3 and minor == 21 and patch == 6 and build_num < 2)
):
if "constrains" in record:
record["constrains"].append("conda !=4.11.0")
else:
record["constrains"] = ["conda !=4.11.0"]
Comment on lines +1249 to +1252
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not what you'd want, c.f. conda-forge/conda-feedstock#108 (comment)
(but I'm also not sure what the actual behavior will be).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbargull had to reread the 4.4.0 release log a few times...so since conda-build actually depends on conda this isn't a constrains (which is optional) instead we want to inject this requirement as a depends?

Suggested change
if "constrains" in record:
record["constrains"].append("conda !=4.11.0")
else:
record["constrains"] = ["conda !=4.11.0"]
for i, d in enumerate(record["depends"]):
if dep in d:
record["depends"][i] += ",<4.11.0"
break
else:
record["depends"].append("conda <4.11.0")


# replace =2.7 with ==2.7.* for compatibility with older conda
new_deps = []
changed = False
Expand Down