-
Notifications
You must be signed in to change notification settings - Fork 24
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
conda 4.4 compatibility #96
Open
kalefranz
wants to merge
7
commits into
conda-tools:master
Choose a base branch
from
kalefranz:conda-4.4-compat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
403b2c7
conda 4.4 compatibility
kalefranz 3b0ea94
kick off new build with conda 4.4.9
kalefranz 30253c9
make test build number int rather than str
kalefranz ecb937c
ensure conversion of dicts to PackageRecord objects
kalefranz 10c475d
also ensure dist
kalefranz 874720a
pin conda-build to 2.1
kalefranz ee403c8
Remove conda-build 2.1 pinning.
kalefranz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -5,7 +5,41 @@ | |
|
||
CONDA_VERSION_MAJOR_MINOR = tuple(int(x) for x in CONDA_VERSION.split('.')[:2]) | ||
|
||
if (4, 3) <= CONDA_VERSION_MAJOR_MINOR < (4, 4): | ||
if (4, 4) <= CONDA_VERSION_MAJOR_MINOR < (4, 5): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this equivalent to: |
||
from conda.lock import Locked | ||
from conda.exports import get_index | ||
from conda.exports import subdir | ||
from conda.exports import MatchSpec | ||
from conda.exports import Unsatisfiable | ||
from conda.exports import NoPackagesFound | ||
from conda.exports import string_types | ||
from conda.models.dist import Dist as _Dist | ||
|
||
def get_key(dist_or_filename): | ||
return dist_or_filename | ||
|
||
def copy_index(index): | ||
return {_Dist(key): index[key] for key in index.keys()} | ||
|
||
def ensure_dist_or_dict(fn): | ||
return _Dist.from_string(fn) | ||
|
||
from conda.gateways.logging import initialize_logging, set_verbosity | ||
initialize_logging() | ||
set_verbosity(1) | ||
|
||
from conda.exports import Resolve as _Resolve | ||
from conda.models.index_record import PackageRecord as _PackageRecord | ||
from conda.models.dist import Dist as _Dist | ||
|
||
class Resolve(_Resolve): | ||
def __init__(self, index): | ||
# ensure conversion of dicts to PackageRecord objects | ||
super(Resolve, self).__init__( | ||
{_Dist(dist): _PackageRecord.from_objects(rec) for dist, rec in index.items()} | ||
) | ||
|
||
elif (4, 3) <= CONDA_VERSION_MAJOR_MINOR < (4, 4): | ||
from conda.lock import Locked | ||
from conda.exports import get_index | ||
from conda.exports import subdir | ||
|
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...did we loose cb3 compatibility? Admittedly some things in cb3 weren't supported yet ( #97 ), but I thought it did work at least ( #93 ). 😕