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.12.2
rev: v0.12.7
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion conda_forge_feedstock_check_solvable/check_solvable.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _is_recipe_solvable_on_platform(
# channel_sources might be part of some zip_key
channel_sources.extend([c.strip() for c in source.split(",")])
else:
channel_sources = ["conda-forge", "defaults"]
channel_sources = ["conda-forge"]

if "msys2" not in channel_sources and platform.startswith("win"):
channel_sources.append("msys2")
Expand Down
25 changes: 15 additions & 10 deletions tests/test_check_solvable.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
VERB = 1


def clone_and_checkout_repo(base_path: pathlib.Path, origin_url: str, ref: str):
subprocess.run(
f"cd {base_path} && git clone {origin_url} repo",
shell=True,
)
return str(base_path / "repo")


@flaky
def test_is_recipe_solvable_ok(feedstock_dir, solver):
recipe_file = os.path.join(feedstock_dir, "recipe", "meta.yaml")
Expand Down Expand Up @@ -150,8 +158,13 @@ def test_r_base_cross_solvable(solver):


@flaky
def test_xgboost_solvable(solver):
feedstock_dir = os.path.join(os.path.dirname(__file__), "xgboost-feedstock")
def test_xgboost_solvable(tmp_path, solver):
feedstock_dir = clone_and_checkout_repo(
tmp_path,
"https://github.com/conda-forge/arrow-cpp-feedstock",
ref="main",
)

solvable, errors, _ = is_recipe_solvable(
feedstock_dir,
solver=solver,
Expand Down Expand Up @@ -215,14 +228,6 @@ def test_guiqwt_solvable(tmp_path, solver):
assert solvable, pprint.pformat(errors)


def clone_and_checkout_repo(base_path: pathlib.Path, origin_url: str, ref: str):
subprocess.run(
f"cd {base_path} && git clone {origin_url} repo",
shell=True,
)
return str(base_path / "repo")


@flaky
def test_arrow_solvable(tmp_path, solver):
feedstock_dir = clone_and_checkout_repo(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
docker_image:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
macos_machine:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
macos_machine:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
macos_machine:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
macos_machine:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
pin_run_as_build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
pin_run_as_build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
channel_sources:
- conda-forge,defaults
- conda-forge
channel_targets:
- conda-forge main
pin_run_as_build:
Expand Down
20 changes: 8 additions & 12 deletions tests/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_solvers_apply_pins(tmp_path, solver_factory):
config=config,
)

solver = solver_factory(("conda-forge", "defaults"), "linux-64")
solver = solver_factory(("conda-forge",), "linux-64")

metas = conda_build.api.render(
str(tmp_path),
Expand All @@ -102,7 +102,7 @@ def test_solvers_apply_pins(tmp_path, solver_factory):
permit_undefined_jinja=True,
finalize=False,
bypass_env_check=True,
channel_urls=("conda-forge", "defaults"),
channel_urls=("conda-forge",),
)

m = metas[0][0]
Expand Down Expand Up @@ -155,9 +155,7 @@ def test_solvers_constraints_unsolvable(solver_factory):
def test_solvers_nvcc_with_virtual_package(solver_factory):
with suppress_output():
virtual_packages = virtual_package_repodata()
solver = solver_factory(
(virtual_packages, "conda-forge", "defaults"), "linux-64"
)
solver = solver_factory((virtual_packages, "conda-forge"), "linux-64")
out = solver.solve(
["gcc_linux-64 7.*", "gxx_linux-64 7.*", "nvcc_linux-64 11.0.*"]
)
Expand All @@ -171,22 +169,20 @@ def test_solvers_archspec_with_virtual_package(solver_factory):
virtual_packages = virtual_package_repodata()

# Not having the fake virtual packages should fail
solver = solver_factory(("conda-forge", "defaults"), "linux-64")
solver = solver_factory(("conda-forge",), "linux-64")
out = solver.solve(["pythia8 8.312"])
assert not out[0], out[1]

# Including the fake virtual packages should succeed
solver = solver_factory(
(virtual_packages, "conda-forge", "defaults"), "linux-64"
)
solver = solver_factory((virtual_packages, "conda-forge"), "linux-64")
out = solver.solve(["pythia8 8.312"])
assert out[0], out[1]


@flaky
def test_solvers_hang(solver_factory):
with suppress_output():
solver = solver_factory(("conda-forge", "defaults"), "osx-64")
solver = solver_factory(("conda-forge",), "osx-64")
res = solver.solve(
[
"pytest",
Expand Down Expand Up @@ -222,7 +218,7 @@ def test_solvers_hang(solver_factory):
assert res[0]

with suppress_output():
solver = solver_factory(("conda-forge", "defaults"), "linux-64")
solver = solver_factory(("conda-forge",), "linux-64")
res = solver.solve(
[
"gdal >=2.1.0",
Expand Down Expand Up @@ -406,7 +402,7 @@ def test_solvers_compare_output(mamba_factory, rattler_factory):
@pytest.mark.parametrize("mamba_factory", [MambaSolver, mamba_solver_factory])
@pytest.mark.parametrize("rattler_factory", [RattlerSolver, rattler_solver_factory])
def test_solvers_python(mamba_factory, rattler_factory):
channels = (virtual_package_repodata(), "conda-forge", "defaults", "msys2")
channels = (virtual_package_repodata(), "conda-forge", "msys2")
platform = "linux-64"
for _ in range(4):
mamba_solver = mamba_factory(channels, platform)
Expand Down
6 changes: 0 additions & 6 deletions tests/xgboost-feedstock/.ci_support/README

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading