Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- --py36-plus
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.4
rev: v0.11.8
hooks:
# Run the linter.
- id: ruff
Expand Down
11 changes: 8 additions & 3 deletions conda_forge_feedstock_check_solvable/rattler_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def run_rattler_build(command):
try:
# Run the command and capture output
print_debug("Running: ", " ".join(command))
print_debug("Running: %s", " ".join(command))
result = subprocess.run(
" ".join(command), shell=True, check=False, capture_output=True, text=True
)
Expand All @@ -36,10 +36,15 @@ def invoke_rattler_build(
virtual_package_repo_url = virtual_package_repodata()
# create a temporary file and dump the variants as YAML
with tempfile.NamedTemporaryFile(mode="w", delete=False) as variants_file:
yaml.dump(variants, variants_file)
channel_sources = variants.get("channel_sources", [])
yaml.dump(
{k: v for k, v in variants.items() if k != "channel_sources"},
variants_file,
)
variants_file.flush()

channels_args = []
for c in channels:
for c in channels + channel_sources:
channels_args.extend(["-c", c])

channels_args.extend(["-c", virtual_package_repo_url])
Expand Down
16 changes: 8 additions & 8 deletions conda_forge_feedstock_check_solvable/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
}


def print_verb(fmt, *args, verbosity=0):
from inspect import currentframe, getframeinfo
def print_verb(fmt, *args, verbosity=0, stack_bump=1):
from inspect import stack

frameinfo = getframeinfo(currentframe())
frameinfo = stack()[stack_bump]

if verbosity <= VERBOSITY:
if args:
Expand All @@ -114,7 +114,7 @@ def print_verb(fmt, *args, verbosity=0):
print(
VERBOSITY_PREFIX[verbosity]
+ ":"
+ __name__
+ frameinfo.frame.f_globals["__name__"]
+ ":"
+ "%d" % frameinfo.lineno
+ ":"
Expand All @@ -124,19 +124,19 @@ def print_verb(fmt, *args, verbosity=0):


def print_critical(fmt, *args):
print_verb(fmt, *args, verbosity=0)
print_verb(fmt, *args, verbosity=0, stack_bump=2)


def print_warning(fmt, *args):
print_verb(fmt, *args, verbosity=1)
print_verb(fmt, *args, verbosity=1, stack_bump=2)


def print_info(fmt, *args):
print_verb(fmt, *args, verbosity=2)
print_verb(fmt, *args, verbosity=2, stack_bump=2)


def print_debug(fmt, *args):
print_verb(fmt, *args, verbosity=3)
print_verb(fmt, *args, verbosity=3, stack_bump=2)


@contextlib.contextmanager
Expand Down
Loading