-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix case when using multiple platforms but pip contains a single plat…
…form Prevents ``` File "/Users/bas.nijholt/micromamba/lib/python3.11/site-packages/conda_lock/src_parser/environment_yaml.py", line 58, in _parse_environment_file_for_platform for spec in mapping_spec["pip"]: TypeError: 'NoneType' object is not iterable ``` Which occurs when locking: ``` name: example channels: - conda-forge dependencies: - tomli - pip: - psutil # [linux64] platforms: - linux-64 - osx-arm64 ``` Which becomes: ``` env_yaml_data = {'name': 'test-pip-with-platform-selector', 'channels': ['conda-forge'], 'dependencies': ['tomli', {'pip': None}], 'platforms': ['linux-64', 'osx-arm64']} ``` For `osx-arm64`. This fix skips `{"pip": None}`.
- Loading branch information
1 parent
f912d92
commit 857c430
Showing
2 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: test-pip-with-platform-selector | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- tomli | ||
- pip: | ||
- psutil # [linux64] | ||
platforms: | ||
- linux-64 | ||
- osx-arm64 |