Skip to content

Commit 877ded7

Browse files
committed
refactor: use conda-build to parse variant config files normally
1 parent eab3785 commit 877ded7

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

conda_forge_tick/provide_source_code.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import glob
22
import logging
33
import os
4-
import pprint
54
import shutil
65
import sys
76
import tempfile
@@ -134,10 +133,6 @@ def _print_out():
134133
from conda_build.api import render
135134
from conda_build.config import get_or_merge_config
136135
from conda_build.source import provide
137-
from conda_build.variants import (
138-
get_package_variants,
139-
list_of_dicts_to_dict_of_lists,
140-
)
141136

142137
# Use conda build to do all the downloading/extracting bits
143138
config = get_or_merge_config(None)
@@ -151,20 +146,12 @@ def _print_out():
151146
# try global pinnings
152147
os.path.join(os.environ["CONDA_PREFIX"], "conda_build_config.yaml")
153148
]
154-
variants = get_package_variants(recipe_dir, config=config)[0]
155-
variants = list_of_dicts_to_dict_of_lists([variants])
156-
for key in CONDA_BUILD_SPECIAL_KEYS:
157-
if key in variants:
158-
del variants[key]
159-
logger.debug(
160-
"conda build src input variants:\n%s", pprint.pformat(variants)
161-
)
162149

163150
md = render(
164151
recipe_dir,
152+
config=config,
165153
finalize=False,
166154
bypass_env_check=True,
167-
variants=variants,
168155
)
169156
if not md:
170157
return None

0 commit comments

Comments
 (0)