Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json, add an
entry 'conda-forge: https://anaconda-repo.dev/packages'.
"""),
'custom_multichannels': dals("""
A multichannel is a metachannel composed of multiple channels. The two reserved
multichannels are 'defaults' and 'local'. The 'defaults' multichannel is
customized using the 'default_channels' parameter. The 'local'
multichannel is a list of file:// channel locations where conda-build stashes
successfully-built packages. Other multichannels can be defined with
custom_multichannels, where the key is the multichannel name and the value is
a list of channel names and/or channel urls.
"""),
'default_channels': dals("""
The list of channel names and/or urls used for the 'defaults' multichannel.
"""),
'disallow': dals("""
Package specifications to disallow installing. The default is to allow
all packages.
"""),
'envs_dirs': dals("""
The list of directories to search for named environments. When creating a new
named environment, the environment will be placed in the first writable
location.
"""),
'force': dals("""
Override any of conda's objections and safeguards for installing packages and
potentially breaking environments. Also re-installs the package, even if the
package is already installed. Implies --no-deps.
"""),
'json': dals("""
Ensure all output written to stdout is structured json.
"""),
- sam
"""),
'file6': dals("""
channels:
- elmer
- marv #!bottom
- bugs
"""),
'file7': dals("""
channels:
- wile
- daffy #!top
- sam #!top
- foghorn
"""),
'file8': dals("""
channels:
- pepé #!bottom
- marv #!top
- wile
- sam
"""),
'file9': dals("""
channels: #!final
- sam
- pepé
- marv #!top
- daffy #!bottom
"""),
'bad_boolean': "always_yes: yeah",
'too_many_aliases': dals("""
always_yes: yes
def test_cuda_fail_1():
specs = MatchSpec("cudatoolkit"),
# No cudatoolkit in index for CUDA 8.0
with env_var('CONDA_OVERRIDE_CUDA', '8.0'):
with get_solver_cuda(specs) as solver:
with pytest.raises(UnsatisfiableError) as exc:
final_state = solver.solve_final_state()
assert str(exc.value).strip() == dals("""The following specifications were found to be incompatible with your CUDA driver:
if action == 'pre-link': # pragma: no cover
# old no-arch support; deprecated
is_old_noarch = False
try:
with open(path) as f:
script_text = ensure_text_type(f.read())
if ((on_win and "%PREFIX%\\python.exe %SOURCE_DIR%\\link.py" in script_text)
or "$PREFIX/bin/python $SOURCE_DIR/link.py" in script_text):
is_old_noarch = True
except Exception as e:
log.debug(e, exc_info=True)
env['SOURCE_DIR'] = prefix
if not is_old_noarch:
warnings.warn(dals("""
Package %s uses a pre-link script. Pre-link scripts are potentially dangerous.
This is because pre-link scripts have the ability to change the package contents in the
package cache, and therefore modify the underlying files for already-created conda
environments. Future versions of conda may deprecate and ignore pre-link scripts.
""") % prec.dist_str())
script_caller = None
if on_win:
ensure_comspec_set()
try:
comspec = os.environ[str('COMSPEC')]
except KeyError:
log.info("failed to run %s for %s due to COMSPEC KeyError", action, prec.dist_str())
return False
if activate:
script_caller, command_args = wrap_subprocess_call(
'shortcuts': dals("""
Allow packages to create OS-specific shortcuts (e.g. in the Windows Start
Menu) at install time.
"""),
'show_channel_urls': dals("""
Show channel URLs when displaying what is going to be downloaded.
"""),
'ssl_verify': dals("""
Conda verifies SSL certificates for HTTPS requests, just like a web
browser. By default, SSL verification is enabled, and conda operations will
fail if a required url's certificate cannot be verified. Setting ssl_verify to
False disables certification verificaiton. The value for ssl_verify can also
be (1) a path to a CA bundle file, or (2) a path to a directory containing
certificates of trusted CA.
"""),
'track_features': dals("""
A list of features that are tracked by default. An entry here is similar to
adding an entry to the create_default_packages list.
"""),
'use_pip': dals("""
Include non-conda-installed python packages with conda list. This does not
affect any conda command or functionality other than the output of the
command conda list.
"""),
'verbosity': dals("""
Sets output log level. 0 is warn. 1 is info. 2 is debug. 3 is trace.
def make_file_link_action(source_path_data):
# TODO: this inner function is still kind of a mess
noarch = package_info.index_json_record.noarch
if noarch == NoarchType.python:
sp_dir = transaction_context['target_site_packages_short_path']
target_short_path = get_python_noarch_target_path(source_path_data.path, sp_dir)
elif noarch is None or noarch == NoarchType.generic:
target_short_path = source_path_data.path
else:
raise CondaUpgradeError(dals("""
The current version of conda is too old to install this package.
Please update conda."""))
link_type, placeholder, fmode = get_prefix_replace(source_path_data)
if placeholder:
return PrefixReplaceLinkAction(transaction_context, package_info,
package_info.extracted_package_dir,
source_path_data.path,
target_prefix, target_short_path,
requested_link_type,
placeholder, fmode, source_path_data)
else:
return LinkPathAction(transaction_context, package_info,
package_info.extracted_package_dir, source_path_data.path,
target_prefix, target_short_path,
def load(self):
_internal_state = self._load()
if _internal_state.get("repodata_version", 0) > MAX_REPODATA_VERSION:
raise CondaUpgradeError(dals("""
The current version of conda is too old to read repodata from
%s
(This version only supports repodata_version 1.)
Please update conda to use this channel.
""") % self.url_w_repodata_fn)
self._internal_state = _internal_state
self._package_records = _internal_state['_package_records']
self._names_index = _internal_state['_names_index']
self._track_features_index = _internal_state['_track_features_index']
self._loaded = True
return self
(2) just a scheme, which will match requests to that scheme. Values are are
the actual proxy server, and are of the form
'scheme://[user:password@]host[:port]'. The optional 'user:password' inclusion
enables HTTP Basic Auth with your proxy.
"""),
'quiet': dals("""
Disable progress bar display and other output.
"""),
'remote_connect_timeout_secs': dals("""
The number seconds conda will wait for your client to establish a connection
to a remote url resource.
"""),
'remote_max_retries': dals("""
The maximum number of retries each HTTP connection should attempt.
"""),
'remote_read_timeout_secs': dals("""
Once conda has connected to a remote resource and sent an HTTP request, the
read timeout is the number of seconds conda will wait for the server to send
a response.
"""),
'rollback_enabled': dals("""
Should any error occur during an unlink/link transaction, revert any disk
mutations made to that point in the transaction.
"""),
'shortcuts': dals("""
Allow packages to create OS-specific shortcuts (e.g. in the Windows Start
Menu) at install time.
"""),
'show_channel_urls': dals("""
Show channel URLs when displaying what is going to be downloaded.
"""),
'ssl_verify': dals("""
The maximum number of retries each HTTP connection should attempt.
"""),
'remote_read_timeout_secs': dals("""
Once conda has connected to a remote resource and sent an HTTP request, the
read timeout is the number of seconds conda will wait for the server to send
a response.
"""),
'rollback_enabled': dals("""
Should any error occur during an unlink/link transaction, revert any disk
mutations made to that point in the transaction.
"""),
'shortcuts': dals("""
Allow packages to create OS-specific shortcuts (e.g. in the Windows Start
Menu) at install time.
"""),
'show_channel_urls': dals("""
Show channel URLs when displaying what is going to be downloaded.
"""),
'ssl_verify': dals("""
Conda verifies SSL certificates for HTTPS requests, just like a web
browser. By default, SSL verification is enabled, and conda operations will
fail if a required url's certificate cannot be verified. Setting ssl_verify to
False disables certification verificaiton. The value for ssl_verify can also
be (1) a path to a CA bundle file, or (2) a path to a directory containing
certificates of trusted CA.
"""),
'track_features': dals("""
A list of features that are tracked by default. An entry here is similar to
adding an entry to the create_default_packages list.
"""),
'use_pip': dals("""
Include non-conda-installed python packages with conda list. This does not
def make_dev_egg_info_file(target_path):
# target_path: join(conda_source_root, 'conda.egg-info')
if isfile(target_path):
with open(target_path) as fh:
old_contents = fh.read()
else:
old_contents = ""
new_contents = dals("""
Metadata-Version: 1.1
Name: conda
Version: %s
Platform: UNKNOWN
Summary: OS-agnostic, system-level binary package manager.
""") % CONDA_VERSION
if old_contents == new_contents:
return Result.NO_CHANGE
if context.verbosity:
print('\n', file=sys.stderr)
print(target_path, file=sys.stderr)
print(make_diff(old_contents, new_contents), file=sys.stderr)
if not context.dry_run:
if lexists(target_path):