feat: align with upcoming virtual package cep #1028
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aligns our virtual package implementation with the upcoming virtual package cep. I think most of the changes proposed in the CEP make a lot of sense so I feel we can already merge this PR before the CEP is accepted.
In particular, I made the following changes:
__winnow also reports the version of Windows.__wincan be overridden withCONDA_OVERRIDE_WIN__linuxcan be overridden withCONDA_OVERRIDE_LINUX__archspeccan be overriden withCONDA_OVERRIDE_ARCHSPEC__archspecfalls back to deriving the archspec from the platform if it could not be determined.__archspecis added as__archspec=1=0if the no archspec could be determined for the current platform.Changes I explicitly did not make (also left a question in the CEP):
osx-arm64should fall back toarm64archspec but we usem1instead.win-arm64should fall back toarm64archspec but we useaarch64instead.I left this in because
arm64is not an existing archspec andm1andaarch64are the base microarchitectures forosx-arm64andwin-arm64respectively. I think this will yield better defaults.I also added a
VirtualPackagesstruct that contains all the virtual package implementations and provides handy utilities to convert it to a list ofVirtualPackageor a list ofGenericVirtualPackage. Detection of virtual packages is now also handled by this struct.Tagging @jaimergp so he is aware of this!