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:
__win
now also reports the version of Windows.__win
can be overridden withCONDA_OVERRIDE_WIN
__linux
can be overridden withCONDA_OVERRIDE_LINUX
__archspec
can be overriden withCONDA_OVERRIDE_ARCHSPEC
__archspec
falls back to deriving the archspec from the platform if it could not be determined.__archspec
is added as__archspec=1=0
if the no archspec could be determined for the current platform.Changes I explicitly did not make (also left a question in the CEP):
osx-arm64
should fall back toarm64
archspec but we usem1
instead.win-arm64
should fall back toarm64
archspec but we useaarch64
instead.I left this in because
arm64
is not an existing archspec andm1
andaarch64
are the base microarchitectures forosx-arm64
andwin-arm64
respectively. I think this will yield better defaults.I also added a
VirtualPackages
struct that contains all the virtual package implementations and provides handy utilities to convert it to a list ofVirtualPackage
or a list ofGenericVirtualPackage
. Detection of virtual packages is now also handled by this struct.Tagging @jaimergp so he is aware of this!