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

Set upper bounds for conda with older conda-build releases #159

Merged
merged 1 commit into from
May 28, 2022
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
23 changes: 15 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from collections import defaultdict
from os.path import dirname, isdir, isfile, join

from conda.models.version import VersionOrder

import requests

CHANNEL_NAME = "main"
Expand Down Expand Up @@ -728,17 +730,22 @@ def patch_record_in_place(fn, record, subdir):
depends.append('python-libarchive-c')

if name == "conda-build":
# Jinja 3.0.0 introduced behavior changes that broke certain
# conda-build templating functionality.
#
# TODO: Review the conda-build and/or jinja version bounds on new
# releases of those packages; at some point, the incompatibilities
# between conda-build and jinja >=3.0 should be resolved.
for i, dep in enumerate(depends):
name, *other = dep.split()
if name == "jinja2":
dep_name, *other = dep.split()
# Jinja 3.0.0 introduced behavior changes that broke certain
# conda-build templating functionality.
#
# TODO: Review the conda-build and/or jinja version bounds on new
# releases of those packages; at some point, the incompatibilities
# between conda-build and jinja >=3.0 should be resolved.
if dep_name == "jinja2":
depends[i] = "jinja2 <3.0.0a0"

# Deprecation removed in conda 4.13 break older conda-builds
if (VersionOrder(version) <= VersionOrder("3.21.8") and
dep_name == "conda"):
depends[i] = "{} {}<4.13.0".format(dep_name, other[0] + "," if other else "")

if (name == 'constructor' and int(version[0]) < 3):
replace_dep(depends, 'conda', 'conda <4.6.0a0')

Expand Down