Skip to content

Commit

Permalink
Add *_constrains run_export types
Browse files Browse the repository at this point in the history
  • Loading branch information
mbargull committed Nov 13, 2020
1 parent 7429f8e commit 2d9db62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion conda_build/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,31 +410,44 @@ def add_upstream_pins(m, permit_unsatisfiable_variants, exclude_pattern):
permit_unsatisfiable_variants, exclude_pattern)
if m.noarch or m.noarch_python:
extra_run_specs = set(extra_run_specs_from_host.get('noarch', []))
extra_run_constrained_specs = set([])
else:
extra_run_specs = set(extra_run_specs_from_host.get('strong', []) +
extra_run_specs_from_host.get('weak', []) +
extra_run_specs_from_build.get('strong', []))
extra_run_constrained_specs = set(
extra_run_specs_from_host.get('strong_constrains', []) +
extra_run_specs_from_host.get('weak_constrains', []) +
extra_run_specs_from_build.get('strong_constrains', [])
)
else:
host_deps = []
host_unsat = []
if m.noarch or m.noarch_python:
if m.build_is_host:
extra_run_specs = set(extra_run_specs_from_build.get('noarch', []))
extra_run_constrained_specs = set([])
build_deps = set(build_deps or []).update(extra_run_specs_from_build.get('noarch', []))
else:
extra_run_specs = set([])
extra_run_constrained_specs = set([])
build_deps = set(build_deps or [])
else:
extra_run_specs = set(extra_run_specs_from_build.get('strong', []))
extra_run_constrained_specs = set(extra_run_specs_from_build.get('strong_constrains', []))
if m.build_is_host:
extra_run_specs.update(extra_run_specs_from_build.get('weak', []))
extra_run_constrained_specs.update(extra_run_specs_from_build.get('weak_constrains', []))
build_deps = set(build_deps or []).update(extra_run_specs_from_build.get('weak', []))
else:
host_deps = set(extra_run_specs_from_build.get('strong', []))

run_deps = extra_run_specs | set(utils.ensure_list(requirements.get('run')))
run_constrained_deps = extra_run_constrained_specs | set(utils.ensure_list(requirements.get('run_constrained')))

for section, deps in (('build', build_deps), ('host', host_deps), ('run', run_deps)):
for section, deps in (
('build', build_deps), ('host', host_deps), ('run', run_deps), ('run_constrained', run_constrained_deps),
):
if deps:
requirements[section] = list(deps)

Expand Down
2 changes: 2 additions & 0 deletions conda_build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ def glob(pathname, recursive=True):
"weak",
"strong",
"noarch",
"weak_constrains",
"strong_constrains",
}

PY_TMPL = """
Expand Down

0 comments on commit 2d9db62

Please sign in to comment.