def test_key_value_features_match(self): dst = Dist('defaults::foo-1.2.3-4.tar.bz2') a = MatchSpec(features='test') assert text_type(a) == "*[provides_features='test=true']" assert not a.match(DPkg(dst)) assert not a.match(DPkg(dst, track_features='')) assert a.match(DPkg(dst, track_features='test')) assert not a.match(DPkg(dst, track_features='test2')) assert a.match(DPkg(dst, track_features='test me')) assert a.match(DPkg(dst, track_features='you test')) assert a.match(DPkg(dst, track_features='you test me')) assert a.get_exact_value('provides_features') == frozendict({'test': 'true'}) b = MatchSpec(features='mkl') assert not b.match(DPkg(dst)) assert b.match(DPkg(dst, track_features='mkl')) assert b.match(DPkg(dst, track_features='blas=mkl')) assert b.match(DPkg(dst, track_features='blas=mkl debug')) assert not b.match(DPkg(dst, track_features='debug')) c = MatchSpec(features='nomkl') assert not c.match(DPkg(dst)) assert not c.match(DPkg(dst, track_features='mkl')) assert c.match(DPkg(dst, track_features='nomkl')) assert c.match(DPkg(dst, track_features='blas=nomkl debug'))
def get_index_r_3(): with open(join(dirname(__file__), 'index3.json')) as fi: packages = json.load(fi) repodata = { "info": { "subdir": context.subdir, "arch": context.arch_name, "platform": context.platform, }, "packages": packages, } index = {} channel = Channel('defaults') supplement_index_with_repodata(index, repodata, channel, 1) add_feature_records(index) index = frozendict(index) r = Resolve(index) index = r.index return index, r
'$HOME/.conda/condarc.d/', '$HOME/.condarc', # '$ENV/.condarc', # '$ENV/.condaenv.yml', '$CONDARC', ) DEFAULT_CHANNEL_ALIAS = 'https://conda.anaconda.org/' PLATFORM_DIRECTORIES = ("linux-64", "linux-32", "win-64", "win-32", "osx-64", "noarch") RECOGNIZED_URL_SCHEMES = ('http', 'https', 'ftp', 's3', 'file') if Platform.from_sys() is Platform.win: DEFAULT_CHANNELS = ('https://repo.continuum.io/pkgs/free', 'https://repo.continuum.io/pkgs/pro', 'https://repo.continuum.io/pkgs/msys2', ) else: DEFAULT_CHANNELS = ('https://repo.continuum.io/pkgs/free', 'https://repo.continuum.io/pkgs/pro', ) ROOT_ENV_NAME = 'root' EMPTY_LIST = () EMPTY_MAP = frozendict(dict())
PLATFORM_DIRECTORIES = ("linux-64", "linux-32", "win-64", "win-32", "osx-64", "noarch") RECOGNIZED_URL_SCHEMES = ('http', 'https', 'ftp', 's3', 'file') if Platform.from_sys() is Platform.win: DEFAULT_CHANNELS = ('https://repo.continuum.io/pkgs/free', 'https://repo.continuum.io/pkgs/pro', 'https://repo.continuum.io/pkgs/msys2', ) else: DEFAULT_CHANNELS = ('https://repo.continuum.io/pkgs/free', 'https://repo.continuum.io/pkgs/pro', ) ROOT_ENV_NAME = 'root' EMPTY_LIST = () EMPTY_MAP = frozendict() class _Null(object): def __nonzero__(self): return False NULL = _Null() UTF8 = 'UTF-8'