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

Merge 24.7.x back into main #5436

Merged
merged 2 commits into from
Aug 1, 2024
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
4 changes: 2 additions & 2 deletions .authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@
alternate_emails:
- [email protected]
- name: Ken Odegard
num_commits: 212
num_commits: 213
email: [email protected]
first_commit: 2020-09-08 19:53:41
github: kenodegard
Expand Down Expand Up @@ -1251,7 +1251,7 @@
github: beeankha
alternate_emails:
- [email protected]
num_commits: 36
num_commits: 34
first_commit: 2022-01-19 16:40:06
- name: Conda Bot
email: [email protected]
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
[//]: # (current developments)

## 24.7.1 (2024-07-30)

### Bug fixes

* Check for WSL existence before calling `os.stat`. (#5433 via #5434)

### Contributors

* @kenodegard



## 24.7.0 (2024-07-18)

### Enhancements
Expand Down
5 changes: 4 additions & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,10 @@ def bundle_conda(
if (
# WSL bash is always the same path, it is an alias to the default
# distribution as configured by the user
on_win and Path("C:\\Windows\\System32\\bash.exe").samefile(args[0])
on_win
# check if WSL is installed before calling Path.samefile/os.stat
and (wsl_bash := Path("C:\\Windows\\System32\\bash.exe")).exists()
and wsl_bash.samefile(args[0])
):
raise CondaBuildUserError(
"WSL bash.exe is not supported. Please use MSYS2 packages. Add "
Expand Down
13 changes: 11 additions & 2 deletions tests/test_api_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1963,8 +1963,13 @@ def test_activated_prefixes_in_actual_path(testing_metadata):

@pytest.mark.parametrize("add_pip_as_python_dependency", [False, True])
def test_add_pip_as_python_dependency_from_condarc_file(
testing_metadata, testing_workdir, add_pip_as_python_dependency, monkeypatch
):
testing_metadata: MetaData,
testing_workdir: str | os.PathLike,
add_pip_as_python_dependency: bool,
monkeypatch: MonkeyPatch,
mocker: MockerFixture,
tmp_path: Path,
) -> None:
"""
Test whether settings from .condarc files are needed.
ref: https://github.com/conda/conda-libmamba-solver/issues/393
Expand All @@ -1976,6 +1981,10 @@ def test_add_pip_as_python_dependency_from_condarc_file(
# SubdirData's cache doesn't distinguish on add_pip_as_python_dependency.
SubdirData._cache_.clear()

# clear cache
mocker.patch("conda.base.context.Context.pkgs_dirs", pkgs_dirs := (str(tmp_path),))
assert context.pkgs_dirs == pkgs_dirs

testing_metadata.meta["build"]["script"] = ['python -c "import pip"']
testing_metadata.meta["requirements"]["host"] = ["python"]
del testing_metadata.meta["test"]
Expand Down
Loading