├── .gitattributes
├── .github
├── CODEOWNERS
├── template-files
│ └── config.yml
└── workflows
│ ├── integration-test.yml
│ ├── mkdocs.yml
│ ├── release.yaml
│ ├── test.yml
│ ├── update-lockfile.yaml
│ └── update.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dockerfile
├── DockerfileTest
├── LICENSE
├── README.md
├── codecov.yml
├── conda_lock
├── __init__.py
├── __main__.py
├── _export_lock_spec_compute_platform_indep.py
├── _vendor
│ ├── LICENSES.md
│ ├── README.md
│ ├── __init__.py
│ ├── cleo.LICENSE
│ ├── cleo
│ │ ├── LICENSE
│ │ ├── __init__.py
│ │ ├── _compat.py
│ │ ├── _utils.py
│ │ ├── application.py
│ │ ├── color.py
│ │ ├── commands
│ │ │ ├── __init__.py
│ │ │ ├── base_command.py
│ │ │ ├── command.py
│ │ │ ├── completions
│ │ │ │ ├── __init__.py
│ │ │ │ └── templates.py
│ │ │ ├── completions_command.py
│ │ │ ├── help_command.py
│ │ │ └── list_command.py
│ │ ├── cursor.py
│ │ ├── descriptors
│ │ │ ├── __init__.py
│ │ │ ├── application_description.py
│ │ │ ├── descriptor.py
│ │ │ └── text_descriptor.py
│ │ ├── events
│ │ │ ├── __init__.py
│ │ │ ├── console_command_event.py
│ │ │ ├── console_error_event.py
│ │ │ ├── console_event.py
│ │ │ ├── console_events.py
│ │ │ ├── console_signal_event.py
│ │ │ ├── console_terminate_event.py
│ │ │ ├── event.py
│ │ │ └── event_dispatcher.py
│ │ ├── exceptions
│ │ │ └── __init__.py
│ │ ├── formatters
│ │ │ ├── __init__.py
│ │ │ ├── formatter.py
│ │ │ ├── style.py
│ │ │ └── style_stack.py
│ │ ├── helpers.py
│ │ ├── io
│ │ │ ├── __init__.py
│ │ │ ├── buffered_io.py
│ │ │ ├── inputs
│ │ │ │ ├── __init__.py
│ │ │ │ ├── argument.py
│ │ │ │ ├── argv_input.py
│ │ │ │ ├── definition.py
│ │ │ │ ├── input.py
│ │ │ │ ├── option.py
│ │ │ │ ├── string_input.py
│ │ │ │ └── token_parser.py
│ │ │ ├── io.py
│ │ │ ├── null_io.py
│ │ │ └── outputs
│ │ │ │ ├── __init__.py
│ │ │ │ ├── buffered_output.py
│ │ │ │ ├── null_output.py
│ │ │ │ ├── output.py
│ │ │ │ ├── section_output.py
│ │ │ │ └── stream_output.py
│ │ ├── loaders
│ │ │ ├── __init__.py
│ │ │ ├── command_loader.py
│ │ │ └── factory_command_loader.py
│ │ ├── py.typed
│ │ ├── terminal.py
│ │ ├── testers
│ │ │ ├── __init__.py
│ │ │ ├── application_tester.py
│ │ │ └── command_tester.py
│ │ └── ui
│ │ │ ├── __init__.py
│ │ │ ├── choice_question.py
│ │ │ ├── component.py
│ │ │ ├── confirmation_question.py
│ │ │ ├── exception_trace.py
│ │ │ ├── progress_bar.py
│ │ │ ├── progress_indicator.py
│ │ │ ├── question.py
│ │ │ ├── table.py
│ │ │ ├── table_cell.py
│ │ │ ├── table_cell_style.py
│ │ │ ├── table_separator.py
│ │ │ ├── table_style.py
│ │ │ └── ui.py
│ ├── conda.LICENSE
│ ├── conda
│ │ ├── LICENSE
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── _vendor
│ │ │ ├── __init__.py
│ │ │ ├── appdirs.LICENSE.txt
│ │ │ ├── appdirs.py
│ │ │ ├── cpuinfo
│ │ │ │ ├── __init__.py
│ │ │ │ └── cpuinfo.py
│ │ │ ├── distro.LICENSE.txt
│ │ │ ├── distro.py
│ │ │ ├── frozendict
│ │ │ │ ├── LICENSE.txt
│ │ │ │ └── __init__.py
│ │ │ ├── py_cpuinfo.LICENSE
│ │ │ └── vendor.txt
│ │ ├── _version.py
│ │ ├── activate.py
│ │ ├── api.py
│ │ ├── appdirs.LICENSE.txt
│ │ ├── auxlib
│ │ │ ├── LICENSE
│ │ │ ├── __init__.py
│ │ │ ├── collection.py
│ │ │ ├── compat.py
│ │ │ ├── decorators.py
│ │ │ ├── entity.py
│ │ │ ├── exceptions.py
│ │ │ ├── ish.py
│ │ │ ├── logz.py
│ │ │ └── type_coercion.py
│ │ ├── base
│ │ │ ├── __init__.py
│ │ │ ├── constants.py
│ │ │ ├── context.py
│ │ │ └── exceptions.py
│ │ ├── cli
│ │ │ ├── __init__.py
│ │ │ ├── actions.py
│ │ │ ├── common.py
│ │ │ ├── conda_argparse.py
│ │ │ ├── find_commands.py
│ │ │ ├── helpers.py
│ │ │ ├── install.py
│ │ │ ├── main.py
│ │ │ ├── main_clean.py
│ │ │ ├── main_compare.py
│ │ │ ├── main_config.py
│ │ │ ├── main_create.py
│ │ │ ├── main_env.py
│ │ │ ├── main_env_config.py
│ │ │ ├── main_env_create.py
│ │ │ ├── main_env_export.py
│ │ │ ├── main_env_list.py
│ │ │ ├── main_env_remove.py
│ │ │ ├── main_env_update.py
│ │ │ ├── main_env_vars.py
│ │ │ ├── main_export.py
│ │ │ ├── main_info.py
│ │ │ ├── main_init.py
│ │ │ ├── main_install.py
│ │ │ ├── main_list.py
│ │ │ ├── main_mock_activate.py
│ │ │ ├── main_mock_deactivate.py
│ │ │ ├── main_notices.py
│ │ │ ├── main_package.py
│ │ │ ├── main_pip.py
│ │ │ ├── main_remove.py
│ │ │ ├── main_rename.py
│ │ │ ├── main_run.py
│ │ │ ├── main_search.py
│ │ │ ├── main_update.py
│ │ │ └── python_api.py
│ │ ├── common
│ │ │ ├── __init__.py
│ │ │ ├── _logic.py
│ │ │ ├── _os
│ │ │ │ ├── __init__.py
│ │ │ │ ├── linux.py
│ │ │ │ ├── unix.py
│ │ │ │ └── windows.py
│ │ │ ├── compat.py
│ │ │ ├── configuration.py
│ │ │ ├── constants.py
│ │ │ ├── decorators.py
│ │ │ ├── disk.py
│ │ │ ├── io.py
│ │ │ ├── iterators.py
│ │ │ ├── logic.py
│ │ │ ├── path.py
│ │ │ ├── pkg_formats
│ │ │ │ ├── __init__.py
│ │ │ │ └── python.py
│ │ │ ├── serialize.py
│ │ │ ├── signals.py
│ │ │ ├── toposort.py
│ │ │ └── url.py
│ │ ├── core
│ │ │ ├── __init__.py
│ │ │ ├── envs_manager.py
│ │ │ ├── index.py
│ │ │ ├── initialize.py
│ │ │ ├── link.py
│ │ │ ├── package_cache.py
│ │ │ ├── package_cache_data.py
│ │ │ ├── path_actions.py
│ │ │ ├── portability.py
│ │ │ ├── prefix_data.py
│ │ │ ├── solve.py
│ │ │ └── subdir_data.py
│ │ ├── deprecations.py
│ │ ├── distro.LICENSE.txt
│ │ ├── env
│ │ │ ├── __init__.py
│ │ │ ├── env.py
│ │ │ ├── installers
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base.py
│ │ │ │ ├── conda.py
│ │ │ │ └── pip.py
│ │ │ ├── pip_util.py
│ │ │ └── specs
│ │ │ │ ├── __init__.py
│ │ │ │ ├── binstar.py
│ │ │ │ ├── requirements.py
│ │ │ │ └── yaml_file.py
│ │ ├── exception_handler.py
│ │ ├── exceptions.py
│ │ ├── exports.py
│ │ ├── gateways
│ │ │ ├── __init__.py
│ │ │ ├── anaconda_client.py
│ │ │ ├── connection
│ │ │ │ ├── __init__.py
│ │ │ │ ├── adapters
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── ftp.py
│ │ │ │ │ ├── http.py
│ │ │ │ │ ├── localfs.py
│ │ │ │ │ └── s3.py
│ │ │ │ ├── download.py
│ │ │ │ └── session.py
│ │ │ ├── disk
│ │ │ │ ├── __init__.py
│ │ │ │ ├── create.py
│ │ │ │ ├── delete.py
│ │ │ │ ├── link.py
│ │ │ │ ├── lock.py
│ │ │ │ ├── permissions.py
│ │ │ │ ├── read.py
│ │ │ │ ├── test.py
│ │ │ │ └── update.py
│ │ │ ├── logging.py
│ │ │ ├── repodata
│ │ │ │ ├── __init__.py
│ │ │ │ ├── jlap
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── core.py
│ │ │ │ │ ├── fetch.py
│ │ │ │ │ └── interface.py
│ │ │ │ └── lock.py
│ │ │ └── subprocess.py
│ │ ├── history.py
│ │ ├── instructions.py
│ │ ├── misc.py
│ │ ├── models
│ │ │ ├── __init__.py
│ │ │ ├── channel.py
│ │ │ ├── dist.py
│ │ │ ├── enums.py
│ │ │ ├── leased_path_entry.py
│ │ │ ├── match_spec.py
│ │ │ ├── package_info.py
│ │ │ ├── prefix_graph.py
│ │ │ ├── records.py
│ │ │ └── version.py
│ │ ├── notices
│ │ │ ├── __init__.py
│ │ │ ├── cache.py
│ │ │ ├── core.py
│ │ │ ├── fetch.py
│ │ │ ├── types.py
│ │ │ └── views.py
│ │ ├── plan.py
│ │ ├── plugins
│ │ │ ├── __init__.py
│ │ │ ├── hookspec.py
│ │ │ ├── manager.py
│ │ │ ├── post_solves
│ │ │ │ ├── __init__.py
│ │ │ │ └── signature_verification.py
│ │ │ ├── solvers.py
│ │ │ ├── subcommands
│ │ │ │ ├── __init__.py
│ │ │ │ └── doctor
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── health_checks.py
│ │ │ ├── types.py
│ │ │ └── virtual_packages
│ │ │ │ ├── __init__.py
│ │ │ │ ├── archspec.py
│ │ │ │ ├── conda.py
│ │ │ │ ├── cuda.py
│ │ │ │ ├── freebsd.py
│ │ │ │ ├── linux.py
│ │ │ │ ├── osx.py
│ │ │ │ └── windows.py
│ │ ├── py.typed
│ │ ├── py_cpuinfo.LICENSE
│ │ ├── resolve.py
│ │ ├── testing
│ │ │ ├── __init__.py
│ │ │ ├── cases.py
│ │ │ ├── fixtures.py
│ │ │ ├── gateways
│ │ │ │ ├── __init__.py
│ │ │ │ └── fixtures.py
│ │ │ ├── helpers.py
│ │ │ ├── integration.py
│ │ │ ├── notices
│ │ │ │ ├── __init__.py
│ │ │ │ ├── fixtures.py
│ │ │ │ └── helpers.py
│ │ │ └── solver_helpers.py
│ │ ├── trust
│ │ │ ├── __init__.py
│ │ │ ├── constants.py
│ │ │ └── signature_verification.py
│ │ └── utils.py
│ ├── grayskull.pyi
│ ├── grayskull
│ │ ├── LICENSE
│ │ ├── __init__.py
│ │ └── strategy
│ │ │ ├── __init__.py
│ │ │ └── parse_poetry_version.py
│ ├── poetry.LICENSE
│ ├── poetry
│ │ ├── LICENSE
│ │ ├── __main__.py
│ │ ├── __version__.py
│ │ ├── config
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ ├── config_source.py
│ │ │ ├── dict_config_source.py
│ │ │ ├── file_config_source.py
│ │ │ └── source.py
│ │ ├── console
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── command_loader.py
│ │ │ ├── commands
│ │ │ │ ├── __init__.py
│ │ │ │ ├── about.py
│ │ │ │ ├── add.py
│ │ │ │ ├── build.py
│ │ │ │ ├── cache
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── clear.py
│ │ │ │ │ └── list.py
│ │ │ │ ├── check.py
│ │ │ │ ├── command.py
│ │ │ │ ├── config.py
│ │ │ │ ├── debug
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── info.py
│ │ │ │ │ └── resolve.py
│ │ │ │ ├── env
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── activate.py
│ │ │ │ │ ├── info.py
│ │ │ │ │ ├── list.py
│ │ │ │ │ ├── remove.py
│ │ │ │ │ └── use.py
│ │ │ │ ├── env_command.py
│ │ │ │ ├── group_command.py
│ │ │ │ ├── init.py
│ │ │ │ ├── install.py
│ │ │ │ ├── installer_command.py
│ │ │ │ ├── lock.py
│ │ │ │ ├── new.py
│ │ │ │ ├── publish.py
│ │ │ │ ├── remove.py
│ │ │ │ ├── run.py
│ │ │ │ ├── search.py
│ │ │ │ ├── self
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── add.py
│ │ │ │ │ ├── install.py
│ │ │ │ │ ├── lock.py
│ │ │ │ │ ├── remove.py
│ │ │ │ │ ├── self_command.py
│ │ │ │ │ ├── show
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── plugins.py
│ │ │ │ │ ├── sync.py
│ │ │ │ │ └── update.py
│ │ │ │ ├── show.py
│ │ │ │ ├── source
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── add.py
│ │ │ │ │ ├── remove.py
│ │ │ │ │ └── show.py
│ │ │ │ ├── sync.py
│ │ │ │ ├── update.py
│ │ │ │ └── version.py
│ │ │ ├── events
│ │ │ │ ├── __init__.py
│ │ │ │ └── console_events.py
│ │ │ ├── exceptions.py
│ │ │ ├── io
│ │ │ │ ├── __init__.py
│ │ │ │ └── inputs
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── run_argv_input.py
│ │ │ └── logging
│ │ │ │ ├── __init__.py
│ │ │ │ ├── filters.py
│ │ │ │ ├── formatters
│ │ │ │ ├── __init__.py
│ │ │ │ ├── builder_formatter.py
│ │ │ │ └── formatter.py
│ │ │ │ ├── io_formatter.py
│ │ │ │ └── io_handler.py
│ │ ├── core
│ │ │ ├── __init__.py
│ │ │ ├── _vendor
│ │ │ │ ├── fastjsonschema
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __main__.py
│ │ │ │ │ ├── draft04.py
│ │ │ │ │ ├── draft06.py
│ │ │ │ │ ├── draft07.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── generator.py
│ │ │ │ │ ├── indent.py
│ │ │ │ │ ├── ref_resolver.py
│ │ │ │ │ └── version.py
│ │ │ │ ├── lark
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── __pyinstaller
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── hook-lark.py
│ │ │ │ │ ├── ast_utils.py
│ │ │ │ │ ├── common.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── grammar.py
│ │ │ │ │ ├── grammars
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── common.lark
│ │ │ │ │ │ ├── lark.lark
│ │ │ │ │ │ ├── python.lark
│ │ │ │ │ │ └── unicode.lark
│ │ │ │ │ ├── indenter.py
│ │ │ │ │ ├── lark.py
│ │ │ │ │ ├── lexer.py
│ │ │ │ │ ├── load_grammar.py
│ │ │ │ │ ├── parse_tree_builder.py
│ │ │ │ │ ├── parser_frontends.py
│ │ │ │ │ ├── parsers
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── cyk.py
│ │ │ │ │ │ ├── earley.py
│ │ │ │ │ │ ├── earley_common.py
│ │ │ │ │ │ ├── earley_forest.py
│ │ │ │ │ │ ├── grammar_analysis.py
│ │ │ │ │ │ ├── lalr_analysis.py
│ │ │ │ │ │ ├── lalr_interactive_parser.py
│ │ │ │ │ │ ├── lalr_parser.py
│ │ │ │ │ │ ├── lalr_parser_state.py
│ │ │ │ │ │ └── xearley.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── reconstruct.py
│ │ │ │ │ ├── tools
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── nearley.py
│ │ │ │ │ │ ├── serialize.py
│ │ │ │ │ │ └── standalone.py
│ │ │ │ │ ├── tree.py
│ │ │ │ │ ├── tree_matcher.py
│ │ │ │ │ ├── tree_templates.py
│ │ │ │ │ ├── utils.py
│ │ │ │ │ └── visitors.py
│ │ │ │ ├── packaging
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── LICENSE.APACHE
│ │ │ │ │ ├── LICENSE.BSD
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _elffile.py
│ │ │ │ │ ├── _manylinux.py
│ │ │ │ │ ├── _musllinux.py
│ │ │ │ │ ├── _parser.py
│ │ │ │ │ ├── _structures.py
│ │ │ │ │ ├── _tokenizer.py
│ │ │ │ │ ├── licenses
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ └── _spdx.py
│ │ │ │ │ ├── markers.py
│ │ │ │ │ ├── metadata.py
│ │ │ │ │ ├── py.typed
│ │ │ │ │ ├── requirements.py
│ │ │ │ │ ├── specifiers.py
│ │ │ │ │ ├── tags.py
│ │ │ │ │ ├── utils.py
│ │ │ │ │ └── version.py
│ │ │ │ ├── tomli
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _parser.py
│ │ │ │ │ ├── _re.py
│ │ │ │ │ ├── _types.py
│ │ │ │ │ └── py.typed
│ │ │ │ └── vendor.txt
│ │ │ ├── constraints
│ │ │ │ ├── __init__.py
│ │ │ │ ├── generic
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── any_constraint.py
│ │ │ │ │ ├── base_constraint.py
│ │ │ │ │ ├── constraint.py
│ │ │ │ │ ├── empty_constraint.py
│ │ │ │ │ ├── multi_constraint.py
│ │ │ │ │ ├── parser.py
│ │ │ │ │ └── union_constraint.py
│ │ │ │ └── version
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── empty_constraint.py
│ │ │ │ │ ├── exceptions.py
│ │ │ │ │ ├── parser.py
│ │ │ │ │ ├── patterns.py
│ │ │ │ │ ├── util.py
│ │ │ │ │ ├── version.py
│ │ │ │ │ ├── version_constraint.py
│ │ │ │ │ ├── version_range.py
│ │ │ │ │ ├── version_range_constraint.py
│ │ │ │ │ └── version_union.py
│ │ │ ├── exceptions
│ │ │ │ ├── __init__.py
│ │ │ │ └── base.py
│ │ │ ├── factory.py
│ │ │ ├── json
│ │ │ │ ├── __init__.py
│ │ │ │ └── schemas
│ │ │ │ │ ├── poetry-schema.json
│ │ │ │ │ └── project-schema.json
│ │ │ ├── masonry
│ │ │ │ ├── __init__.py
│ │ │ │ ├── api.py
│ │ │ │ ├── builders
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── builder.py
│ │ │ │ │ ├── sdist.py
│ │ │ │ │ └── wheel.py
│ │ │ │ ├── metadata.py
│ │ │ │ └── utils
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── helpers.py
│ │ │ │ │ ├── include.py
│ │ │ │ │ ├── module.py
│ │ │ │ │ └── package_include.py
│ │ │ ├── packages
│ │ │ │ ├── __init__.py
│ │ │ │ ├── dependency.py
│ │ │ │ ├── dependency_group.py
│ │ │ │ ├── directory_dependency.py
│ │ │ │ ├── file_dependency.py
│ │ │ │ ├── package.py
│ │ │ │ ├── path_dependency.py
│ │ │ │ ├── project_package.py
│ │ │ │ ├── specification.py
│ │ │ │ ├── url_dependency.py
│ │ │ │ ├── utils
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── link.py
│ │ │ │ │ └── utils.py
│ │ │ │ └── vcs_dependency.py
│ │ │ ├── poetry.py
│ │ │ ├── py.typed
│ │ │ ├── pyproject
│ │ │ │ ├── __init__.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── tables.py
│ │ │ │ └── toml.py
│ │ │ ├── spdx
│ │ │ │ ├── __init__.py
│ │ │ │ ├── data
│ │ │ │ │ └── licenses.json
│ │ │ │ ├── helpers.py
│ │ │ │ ├── license.py
│ │ │ │ └── updater.py
│ │ │ ├── utils
│ │ │ │ ├── __init__.py
│ │ │ │ ├── _compat.py
│ │ │ │ ├── helpers.py
│ │ │ │ └── patterns.py
│ │ │ ├── vcs
│ │ │ │ ├── __init__.py
│ │ │ │ └── git.py
│ │ │ └── version
│ │ │ │ ├── __init__.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── grammars
│ │ │ │ ├── __init__.py
│ │ │ │ ├── markers.lark
│ │ │ │ └── pep508.lark
│ │ │ │ ├── helpers.py
│ │ │ │ ├── markers.py
│ │ │ │ ├── parser.py
│ │ │ │ ├── pep440
│ │ │ │ ├── __init__.py
│ │ │ │ ├── parser.py
│ │ │ │ ├── segments.py
│ │ │ │ └── version.py
│ │ │ │ └── requirements.py
│ │ ├── exceptions.py
│ │ ├── factory.py
│ │ ├── inspection
│ │ │ ├── __init__.py
│ │ │ ├── info.py
│ │ │ └── lazy_wheel.py
│ │ ├── installation
│ │ │ ├── __init__.py
│ │ │ ├── chef.py
│ │ │ ├── chooser.py
│ │ │ ├── executor.py
│ │ │ ├── installer.py
│ │ │ ├── operations
│ │ │ │ ├── __init__.py
│ │ │ │ ├── install.py
│ │ │ │ ├── operation.py
│ │ │ │ ├── uninstall.py
│ │ │ │ └── update.py
│ │ │ └── wheel_installer.py
│ │ ├── json
│ │ │ ├── __init__.py
│ │ │ └── schemas
│ │ │ │ └── poetry.json
│ │ ├── layouts
│ │ │ ├── __init__.py
│ │ │ ├── layout.py
│ │ │ └── src.py
│ │ ├── locations.py
│ │ ├── masonry
│ │ │ ├── __init__.py
│ │ │ ├── api.py
│ │ │ └── builders
│ │ │ │ ├── __init__.py
│ │ │ │ └── editable.py
│ │ ├── mixology
│ │ │ ├── __init__.py
│ │ │ ├── assignment.py
│ │ │ ├── failure.py
│ │ │ ├── incompatibility.py
│ │ │ ├── incompatibility_cause.py
│ │ │ ├── partial_solution.py
│ │ │ ├── result.py
│ │ │ ├── set_relation.py
│ │ │ ├── term.py
│ │ │ └── version_solver.py
│ │ ├── packages
│ │ │ ├── __init__.py
│ │ │ ├── dependency_package.py
│ │ │ ├── direct_origin.py
│ │ │ ├── locker.py
│ │ │ ├── package_collection.py
│ │ │ └── transitive_package_info.py
│ │ ├── plugins
│ │ │ ├── __init__.py
│ │ │ ├── application_plugin.py
│ │ │ ├── base_plugin.py
│ │ │ ├── plugin.py
│ │ │ └── plugin_manager.py
│ │ ├── poetry.py
│ │ ├── puzzle
│ │ │ ├── __init__.py
│ │ │ ├── exceptions.py
│ │ │ ├── provider.py
│ │ │ ├── solver.py
│ │ │ └── transaction.py
│ │ ├── py.typed
│ │ ├── pyproject
│ │ │ ├── __init__.py
│ │ │ └── toml.py
│ │ ├── repositories
│ │ │ ├── __init__.py
│ │ │ ├── abstract_repository.py
│ │ │ ├── cached_repository.py
│ │ │ ├── exceptions.py
│ │ │ ├── http_repository.py
│ │ │ ├── installed_repository.py
│ │ │ ├── legacy_repository.py
│ │ │ ├── link_sources
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base.py
│ │ │ │ ├── html.py
│ │ │ │ └── json.py
│ │ │ ├── lockfile_repository.py
│ │ │ ├── parsers
│ │ │ │ ├── __init__.py
│ │ │ │ ├── html_page_parser.py
│ │ │ │ └── pypi_search_parser.py
│ │ │ ├── pypi_repository.py
│ │ │ ├── repository.py
│ │ │ ├── repository_pool.py
│ │ │ └── single_page_repository.py
│ │ ├── toml
│ │ │ ├── __init__.py
│ │ │ ├── exceptions.py
│ │ │ └── file.py
│ │ ├── utils
│ │ │ ├── __init__.py
│ │ │ ├── _compat.py
│ │ │ ├── authenticator.py
│ │ │ ├── cache.py
│ │ │ ├── constants.py
│ │ │ ├── dependency_specification.py
│ │ │ ├── env
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_env.py
│ │ │ │ ├── env_manager.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── generic_env.py
│ │ │ │ ├── mock_env.py
│ │ │ │ ├── null_env.py
│ │ │ │ ├── python_manager.py
│ │ │ │ ├── script_strings.py
│ │ │ │ ├── site_packages.py
│ │ │ │ ├── system_env.py
│ │ │ │ └── virtual_env.py
│ │ │ ├── extras.py
│ │ │ ├── helpers.py
│ │ │ ├── isolated_build.py
│ │ │ ├── password_manager.py
│ │ │ ├── patterns.py
│ │ │ ├── pip.py
│ │ │ └── wheel.py
│ │ ├── vcs
│ │ │ ├── __init__.py
│ │ │ └── git
│ │ │ │ ├── __init__.py
│ │ │ │ ├── backend.py
│ │ │ │ └── system.py
│ │ └── version
│ │ │ ├── __init__.py
│ │ │ └── version_selector.py
│ ├── poetry_core.LICENSE
│ └── vendor.txt
├── click_helpers.py
├── common.py
├── conda_lock.py
├── conda_solver.py
├── content_hash_types.py
├── errors.py
├── export_lock_spec.py
├── interfaces
│ ├── vendored_conda.py
│ ├── vendored_grayskull.py
│ ├── vendored_poetry.py
│ └── vendored_poetry_markers.py
├── invoke_conda.py
├── lockfile
│ ├── __init__.py
│ ├── v1
│ │ ├── __init__.py
│ │ └── models.py
│ └── v2prelim
│ │ ├── __init__.py
│ │ └── models.py
├── lookup.py
├── lookup_cache.py
├── models
│ ├── __init__.py
│ ├── channel.py
│ ├── lock_spec.py
│ └── pip_repository.py
├── pypi_solver.py
├── src_parser
│ ├── __init__.py
│ ├── aggregation.py
│ ├── conda_common.py
│ ├── environment_yaml.py
│ ├── markers.py
│ ├── meta_yaml.py
│ ├── pyproject_toml.py
│ └── selectors.py
└── virtual_package.py
├── docs
├── authenticated_channels.md
├── basic_usage.md
├── cli
│ └── gen.md
├── docker.md
├── flags.md
├── flags
│ └── strip-auth.md
├── getting_started.md
├── index.md
├── output.md
├── pip.md
├── pixi-migration.md
├── scipy-2023.md
├── src_environment_yml.md
├── src_meta_yaml.md
└── src_pyproject.md
├── environments
├── README.md
├── conda-lock-python-3.13.yaml
├── conda-lock-python-3.13
│ └── conda-lock-python-3.13.yaml
├── conda-lock-python-3.9.yaml
├── conda-lock-python-3.9
│ └── conda-lock-python-3.9.yaml
├── conda-lock.yml
├── dev-environment.yaml
├── python-3.13.yaml
└── python-3.9.yaml
├── example
├── pangeo
│ ├── conda-lock.yml
│ └── environment.yml
└── zlib
│ ├── conda-lock.yml
│ └── environment.yml
├── mkdocs.yml
├── mypy.ini
├── netlify.toml
├── pixi.lock
├── pixi.toml
├── pyproject.toml
├── pyrightconfig.json
├── renovate.json
├── scripts
├── README.md
└── rerun_vendoring.sh
└── tests
├── __init__.py
├── conftest.py
├── durations
├── README.md
├── macos-py3.13.json
├── macos-py3.9.json
├── ubuntu-py3.13.json
├── ubuntu-py3.9.json
├── windows-py3.13.json
└── windows-py3.9.json
├── gdal
└── environment.yml
├── quetz
└── dev_config.toml
├── test-archspec
└── virtual-packages.yaml
├── test-channel-inversion
└── environment.yaml
├── test-cuda
├── environment.yaml
├── virtual-packages-old-glibc.yaml
└── virtual-packages.yaml
├── test-dependency-removal
├── environment-postupdate.yml
└── environment-preupdate.yml
├── test-env-filter-platform
└── environment.yml
├── test-env-nodefaults
└── environment.yml
├── test-environment-blas-mkl
├── conda-lock.yml
└── environment.yml
├── test-explicit-toposorted
├── conda-lock.yml
└── environment.yml
├── test-flit-default-pip
└── pyproject.toml
├── test-flit-skip-non-conda-lock
└── pyproject.toml
├── test-flit
└── pyproject.toml
├── test-get-pkgs-dirs
├── conda-info.json
├── mamba-info.json
├── micromamba-1.4.5-info.json
├── micromamba-1.4.6-info.json
└── micromamba-config-list-pkgs_dirs.json
├── test-git-package
└── environment.yml
├── test-git-tag
└── environment.yml
├── test-git
└── environment.yml
├── test-input-hash-zlib
├── .gitignore
└── environment.yml
├── test-install-with-pip-deps
├── conda-lock.yml
└── environment.yml
├── test-local-pip
├── environment.yml
├── setup.py
└── testy.py
├── test-lockfile-with-auth
└── test.lock
├── test-lockfile
├── conda-lock.yml
├── no-auth.lock
└── test.lock
├── test-lookup
├── emoji-to-python-dateutil-lookup.yml
├── empty-lookup.yml
└── environment.yml
├── test-message
├── conda.txt
└── mamba.txt
├── test-move-pip-dependency
├── environment-postupdate.yml
└── environment-preupdate.yml
├── test-multi-sources
├── dev.yml
├── main.yml
└── pyproject.toml
├── test-multiple-categories
├── conda-lock.yml
├── dev.yml
├── main.yml
└── test.yml
├── test-os-name-marker
└── environment.yml
├── test-pdm-default-pip
└── pyproject.toml
├── test-pdm-skip-non-conda-lock
└── pyproject.toml
├── test-pdm
└── pyproject.toml
├── test-pip-conda-name-confusion
└── environment.yaml
├── test-pip-finds-recent-manylinux-wheels
└── environment.yml
├── test-pip-full-url
└── environment.yml
├── test-pip-hash-checking
└── environment.yml
├── test-pip-repositories
├── .gitignore
├── environment.yaml
├── fake-private-package-1.0.0
│ ├── PKG-INFO
│ ├── setup.cfg
│ └── setup.py
└── fake-private-package-custom-port-1.0.0
│ ├── PKG-INFO
│ ├── setup.cfg
│ └── setup.py
├── test-pip-respects-glibc-version
├── environment.yml
└── virtual-packages.yml
├── test-pip-with-platform-selector
└── environment.yml
├── test-platforms
└── pyproject.toml
├── test-poetry-default-pip
└── pyproject.toml
├── test-poetry-git-subdir
└── pyproject.toml
├── test-poetry-git
└── pyproject.toml
├── test-poetry-ibis
├── fetch.sh
└── pyproject.toml
├── test-poetry-no-pypi
├── other_project1
│ └── pyproject.toml
├── other_project2
│ └── pyproject.toml
└── pyproject.toml
├── test-poetry-optional
└── pyproject.toml
├── test-poetry-path
├── .gitignore
├── fake-private-package-1.0.0
│ ├── PKG-INFO
│ ├── setup.cfg
│ └── setup.py
└── pyproject.toml
├── test-poetry-skip-non-conda-lock
└── pyproject.toml
├── test-poetry
└── pyproject.toml
├── test-pypi-resolve-gh155
├── conda-lock.yml
└── environment.yml
├── test-pypi-resolve-gh290
├── pyproject
│ └── pyproject.toml
├── tzdata
│ └── environment.yaml
└── wdl
│ └── environment.yaml
├── test-pypi-resolve-gh449
└── environment.yml
├── test-pypi-resolve-namediff
└── environment.yml
├── test-pypi-resolve
└── environment.yml
├── test-recipe
└── meta.yaml
├── test-source-paths
└── sources
│ └── environment.yaml
├── test-stdout
├── conda.txt
└── mamba.txt
├── test-stripped-lockfile
├── no-auth.lock
└── test.lock
├── test-toml-channel
└── pyproject.toml
├── test-update-filter-platform
├── conda-lock.yml
├── environment-postupdate.yml
└── environment-preupdate.yml
├── test-update
├── environment-postupdate.yml
└── environment-preupdate.yml
├── test-uppercase-pip
└── environment.yml
├── test_channel.py
├── test_conda_lock.py
├── test_constraints.py
├── test_lookup_cache.py
├── test_markers.py
├── test_pip_repositories.py
├── test_pixi_toml.py
├── test_regression.py
└── zlib
├── conda-linux-64.lock
├── conda-osx-64.lock
├── conda-win-64.lock
└── environment.yml
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text eol=lf
2 | *.patch binary
3 | *.bat binary
4 | *.exe binary
5 | *.ico binary
6 | # Treat vendor folder as vendored and generated
7 | conda_lock/_vendor/** linguist-vendored linguist-generated
8 | # GitHub syntax highlighting
9 | pixi.lock linguist-language=YAML linguist-generated=true
10 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Syntax for this file at https://help.github.com/articles/about-codeowners/
2 |
3 | * @conda/conda-lock
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **.DS_Store
2 | *.egg-info
3 | *.eggs
4 | *.pyc
5 | *.tar.gz
6 | .mypy_cache/
7 | .vscode/
8 | .idea/
9 | build/
10 | dist/
11 | venv/
12 | test_install*.yml
13 | test_install*.lock
14 | tests/**/*.lock
15 | tests/**/*.yml
16 | tests/**/*.bak
17 | site/
18 | filelock
19 | .coverage
20 | .micromamba/
21 | .pixi/
22 | # Make ad-hoc experimentation easier; remove these once we settle on a config
23 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thanks for helping to improve conda-lock! We appreciate your time and effort.
4 |
5 | ## How to install a dev environment
6 |
7 | Of course, we use conda-lock to manage our development environment.
8 |
9 | 1. Get [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)
10 |
11 | 2. Install and activate the `conda-lock-dev` environment:
12 |
13 | ```shell
14 | micromamba env create --name=conda-lock-dev --category=main --category=dev --file=environments/conda-lock.yml
15 | micromamba activate conda-lock-dev
16 | ```
17 |
18 | 3. Install `conda-lock` in editable mode. This will also install its runtime
19 | dependencies as defined in `pyproject.toml`.
20 |
21 | ```shell
22 | pip install --no-deps --editable .
23 | ```
24 |
25 | 4. Check to ensure that your Python environment is consistent.
26 |
27 | ```shell
28 | pip check
29 | ```
30 |
31 | 5. Finally, while not strictly necessary, it's recommended to install pre-commit to reduce development friction.
32 |
33 | ```shell
34 | pre-commit install
35 | ```
36 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM continuumio/miniconda3:latest
2 |
3 | RUN pip install conda-lock
4 |
5 | ENTRYPOINT conda-lock
6 |
--------------------------------------------------------------------------------
/DockerfileTest:
--------------------------------------------------------------------------------
1 | FROM condaforge/mambaforge
2 |
3 | COPY . conda-lock/
4 |
5 | RUN mamba install pip -y
6 | RUN pip install conda-lock/.
7 |
8 | CMD conda-lock install \
9 | --name test \
10 | --mamba \
11 | conda-lock/test.lock
12 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | patch: false
4 | project: false
5 |
6 | github_checks: false
7 |
8 | comment: false
9 |
--------------------------------------------------------------------------------
/conda_lock/__init__.py:
--------------------------------------------------------------------------------
1 | from importlib.metadata import distribution
2 |
3 | from conda_lock.conda_lock import main
4 |
5 |
6 | __all__ = ["main"]
7 |
8 |
9 | try:
10 | __version__ = distribution("conda_lock").version
11 | except Exception: # noqa: BLE001
12 | __version__ = "unknown"
13 |
--------------------------------------------------------------------------------
/conda_lock/__main__.py:
--------------------------------------------------------------------------------
1 | from .conda_lock import main
2 |
3 |
4 | main()
5 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/README.md:
--------------------------------------------------------------------------------
1 | # Vendored dependencies
2 |
3 | This directory contains an entire vendored copy of Conda so that we can make use of:
4 |
5 | * conda.models.MatchSpec
6 | * conda.common.toposort
7 |
8 | It also contains parts of Poetry (and the associated Poetry Core and Cleo packages) which are used to solve for pip-related dependencies.
9 |
10 | ## Licenses
11 |
12 | Further information about the vendored and subvendored licenses can be found in [LICENSES.md](LICENSES.md).
13 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo.LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Sébastien Eustace
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Sébastien Eustace
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | __version__ = "2.1.0"
5 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/_compat.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import shlex
4 | import subprocess
5 | import sys
6 |
7 |
8 | WINDOWS = sys.platform == "win32"
9 |
10 |
11 | def shell_quote(token: str) -> str:
12 | if WINDOWS:
13 | return subprocess.list2cmdline([token])
14 |
15 | return shlex.quote(token)
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/commands/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/commands/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/commands/completions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/commands/completions/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/commands/list_command.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import ClassVar
4 |
5 | from conda_lock._vendor.cleo.commands.command import Command
6 | from conda_lock._vendor.cleo.io.inputs.argument import Argument
7 |
8 |
9 | class ListCommand(Command):
10 | name = "list"
11 |
12 | description = "Lists commands."
13 |
14 | help = """\
15 | The {command_name} command lists all commands:
16 |
17 | {command_full_name}
18 |
19 | You can also display the commands for a specific namespace:
20 |
21 | {command_full_name} test
22 | """
23 |
24 | arguments: ClassVar[list[Argument]] = [
25 | Argument("namespace", required=False, description="The namespace name")
26 | ]
27 |
28 | def handle(self) -> int:
29 | from conda_lock._vendor.cleo.descriptors.text_descriptor import TextDescriptor
30 |
31 | TextDescriptor().describe(
32 | self._io, self.application, namespace=self.argument("namespace")
33 | )
34 |
35 | return 0
36 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/descriptors/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/descriptors/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/events/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_command_event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.events.console_event import ConsoleEvent
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.cleo.commands.command import Command
10 | from conda_lock._vendor.cleo.io.io import IO
11 |
12 |
13 | class ConsoleCommandEvent(ConsoleEvent):
14 | """
15 | An event triggered before the command is executed.
16 |
17 | It allows to do things like skipping the command or changing the input.
18 | """
19 |
20 | RETURN_CODE_DISABLED: int = 113
21 |
22 | def __init__(self, command: Command, io: IO) -> None:
23 | super().__init__(command, io)
24 |
25 | self._command_should_run = True
26 |
27 | def disable_command(self) -> None:
28 | self._command_should_run = False
29 |
30 | def enable_command(self) -> None:
31 | self._command_should_run = True
32 |
33 | def command_should_run(self) -> bool:
34 | return self._command_should_run
35 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_error_event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.events.console_event import ConsoleEvent
6 | from conda_lock._vendor.cleo.exceptions import CleoError
7 |
8 |
9 | if TYPE_CHECKING:
10 | from conda_lock._vendor.cleo.commands.command import Command
11 | from conda_lock._vendor.cleo.io.io import IO
12 |
13 |
14 | class ConsoleErrorEvent(ConsoleEvent):
15 | """
16 | An event triggered when an exception is raised during the execution of a command.
17 | """
18 |
19 | def __init__(self, command: Command, io: IO, error: Exception) -> None:
20 | super().__init__(command, io)
21 |
22 | self._error = error
23 | self._exit_code: int | None = None
24 |
25 | @property
26 | def error(self) -> Exception:
27 | return self._error
28 |
29 | @property
30 | def exit_code(self) -> int:
31 | if self._exit_code is not None:
32 | return self._exit_code
33 |
34 | if isinstance(self._error, CleoError) and self._error.exit_code is not None:
35 | return self._error.exit_code
36 |
37 | return 1
38 |
39 | def set_error(self, error: Exception) -> None:
40 | self._error = error
41 |
42 | def set_exit_code(self, exit_code: int) -> None:
43 | self._exit_code = exit_code
44 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.events.event import Event
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.cleo.commands.command import Command
10 | from conda_lock._vendor.cleo.io.io import IO
11 |
12 |
13 | class ConsoleEvent(Event):
14 | """
15 | An event that gives access to the IO of a command.
16 | """
17 |
18 | def __init__(self, command: Command, io: IO) -> None:
19 | super().__init__()
20 |
21 | self._command = command
22 | self._io = io
23 |
24 | @property
25 | def command(self) -> Command:
26 | return self._command
27 |
28 | @property
29 | def io(self) -> IO:
30 | return self._io
31 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_events.py:
--------------------------------------------------------------------------------
1 | # The COMMAND event allows to attach listeners before any command
2 | # is executed. It also allows the modification of the command and IO
3 | # before it's handed to the command.
4 | from __future__ import annotations
5 |
6 |
7 | COMMAND = "console.command"
8 |
9 | # The SIGNAL event allows some actions to be performed after
10 | # the command execution is interrupted.
11 | SIGNAL = "console.signal"
12 |
13 | # The TERMINATE event allows listeners to be attached after the command
14 | # is executed by the console.
15 | TERMINATE = "console.terminate"
16 |
17 | # The ERROR event occurs when an uncaught exception is raised.
18 | #
19 | # This event gives the ability to deal with the exception or to modify
20 | # the raised exception.
21 | ERROR = "console.error"
22 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_signal_event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.events.console_event import ConsoleEvent
6 |
7 |
8 | if TYPE_CHECKING:
9 | import signal
10 |
11 | from conda_lock._vendor.cleo.commands.command import Command
12 | from conda_lock._vendor.cleo.io.io import IO
13 |
14 |
15 | class ConsoleSignalEvent(ConsoleEvent):
16 | """
17 | An event triggered by a system signal.
18 | """
19 |
20 | def __init__(
21 | self, command: Command, io: IO, handling_signal: signal.Signals
22 | ) -> None:
23 | super().__init__(command, io)
24 | self._handling_signal = handling_signal
25 |
26 | @property
27 | def handling_signal(self) -> signal.Signals:
28 | return self._handling_signal
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/console_terminate_event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.events.console_event import ConsoleEvent
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.cleo.commands.command import Command
10 | from conda_lock._vendor.cleo.io.io import IO
11 |
12 |
13 | class ConsoleTerminateEvent(ConsoleEvent):
14 | """
15 | An event triggered by after the execution of a command.
16 | """
17 |
18 | def __init__(self, command: Command, io: IO, exit_code: int) -> None:
19 | super().__init__(command, io)
20 |
21 | self._exit_code = exit_code
22 |
23 | @property
24 | def exit_code(self) -> int:
25 | return self._exit_code
26 |
27 | def set_exit_code(self, exit_code: int) -> None:
28 | self._exit_code = exit_code
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/events/event.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class Event:
5 | """
6 | Event
7 | """
8 |
9 | def __init__(self) -> None:
10 | self._propagation_stopped = False
11 |
12 | def is_propagation_stopped(self) -> bool:
13 | return self._propagation_stopped
14 |
15 | def stop_propagation(self) -> None:
16 | self._propagation_stopped = True
17 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/formatters/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/formatters/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/formatters/style_stack.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.cleo.exceptions import CleoValueError
4 | from conda_lock._vendor.cleo.formatters.style import Style
5 |
6 |
7 | class StyleStack:
8 | def __init__(self, empty_style: Style | None = None) -> None:
9 | if empty_style is None:
10 | empty_style = Style()
11 |
12 | self._empty_style = empty_style
13 | self._styles: list[Style] = []
14 |
15 | @property
16 | def current(self) -> Style:
17 | if not self._styles:
18 | return self._empty_style
19 |
20 | return self._styles[-1]
21 |
22 | def reset(self) -> None:
23 | self._styles = []
24 |
25 | def push(self, style: Style) -> None:
26 | self._styles.append(style)
27 |
28 | def pop(self, style: Style | None = None) -> Style:
29 | if not self._styles:
30 | return self._empty_style
31 |
32 | if style is None:
33 | return self._styles.pop()
34 |
35 | sample = style.apply("")
36 |
37 | for i, stacked_style in reversed(list(enumerate(self._styles))):
38 | if sample == stacked_style.apply(""):
39 | self._styles = self._styles[:i]
40 | return stacked_style
41 |
42 | raise CleoValueError("Invalid nested tag found")
43 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/helpers.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import Any
4 |
5 | from conda_lock._vendor.cleo.io.inputs.argument import Argument
6 | from conda_lock._vendor.cleo.io.inputs.option import Option
7 |
8 |
9 | def argument(
10 | name: str,
11 | description: str | None = None,
12 | optional: bool = False,
13 | multiple: bool = False,
14 | default: Any | None = None,
15 | ) -> Argument:
16 | return Argument(
17 | name,
18 | required=not optional,
19 | is_list=multiple,
20 | description=description,
21 | default=default,
22 | )
23 |
24 |
25 | def option(
26 | long_name: str,
27 | short_name: str | None = None,
28 | description: str | None = None,
29 | flag: bool = True,
30 | value_required: bool = True,
31 | multiple: bool = False,
32 | default: Any | None = None,
33 | ) -> Option:
34 | return Option(
35 | long_name,
36 | short_name,
37 | flag=flag,
38 | requires_value=value_required,
39 | is_list=multiple,
40 | description=description,
41 | default=default,
42 | )
43 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/io/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/io/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/io/inputs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/io/inputs/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/io/inputs/string_input.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.cleo.io.inputs.argv_input import ArgvInput
4 | from conda_lock._vendor.cleo.io.inputs.token_parser import TokenParser
5 |
6 |
7 | class StringInput(ArgvInput):
8 | """
9 | Represents an input provided as a string
10 | """
11 |
12 | def __init__(self, input: str) -> None:
13 | super().__init__([])
14 |
15 | self._set_tokens(self._tokenize(input))
16 |
17 | def _tokenize(self, input: str) -> list[str]:
18 | return TokenParser().parse(input)
19 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/io/null_io.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.io.inputs.string_input import StringInput
6 | from conda_lock._vendor.cleo.io.io import IO
7 | from conda_lock._vendor.cleo.io.outputs.null_output import NullOutput
8 |
9 |
10 | if TYPE_CHECKING:
11 | from conda_lock._vendor.cleo.io.inputs.input import Input
12 |
13 |
14 | class NullIO(IO):
15 | def __init__(self, input: Input | None = None) -> None:
16 | super().__init__(input or StringInput(""), NullOutput(), NullOutput())
17 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/io/outputs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/io/outputs/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/loaders/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/loaders/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/loaders/command_loader.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 |
6 | if TYPE_CHECKING:
7 | from conda_lock._vendor.cleo.commands.command import Command
8 |
9 |
10 | class CommandLoader:
11 | @property
12 | def names(self) -> list[str]:
13 | """
14 | All registered command names.
15 | """
16 | raise NotImplementedError
17 |
18 | def get(self, name: str) -> Command:
19 | """
20 | Loads a command.
21 | """
22 | raise NotImplementedError
23 |
24 | def has(self, name: str) -> bool:
25 | """
26 | Checks whether a command exists or not.
27 | """
28 | raise NotImplementedError
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/loaders/factory_command_loader.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import Callable
4 |
5 | from conda_lock._vendor.cleo.commands.command import Command
6 | from conda_lock._vendor.cleo.exceptions import CleoCommandNotFoundError
7 | from conda_lock._vendor.cleo.loaders.command_loader import CommandLoader
8 |
9 |
10 | Factory = Callable[[], Command]
11 |
12 |
13 | class FactoryCommandLoader(CommandLoader):
14 | """
15 | A simple command loader using factories to instantiate commands lazily.
16 | """
17 |
18 | def __init__(self, factories: dict[str, Factory]) -> None:
19 | self._factories = factories
20 |
21 | @property
22 | def names(self) -> list[str]:
23 | return list(self._factories)
24 |
25 | def has(self, name: str) -> bool:
26 | return name in self._factories
27 |
28 | def get(self, name: str) -> Command:
29 | if name not in self._factories:
30 | raise CleoCommandNotFoundError(name)
31 |
32 | return self._factories[name]()
33 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/py.typed
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/testers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/testers/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/ui/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/cleo/ui/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/ui/component.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class Component:
5 | name: str = ""
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/ui/table_cell.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 |
6 | if TYPE_CHECKING:
7 | from conda_lock._vendor.cleo.ui.table_cell_style import TableCellStyle
8 |
9 |
10 | class TableCell(str):
11 | def __new__(
12 | cls,
13 | value: str = "",
14 | rowspan: int = 1,
15 | colspan: int = 1,
16 | style: TableCellStyle | None = None,
17 | ) -> TableCell:
18 | return super().__new__(cls, value)
19 |
20 | def __init__(
21 | self,
22 | value: str = "",
23 | rowspan: int = 1,
24 | colspan: int = 1,
25 | style: TableCellStyle | None = None,
26 | ) -> None:
27 | self._rowspan = rowspan
28 | self._colspan = colspan
29 | self._style = style
30 |
31 | @property
32 | def rowspan(self) -> int:
33 | return self._rowspan
34 |
35 | @property
36 | def colspan(self) -> int:
37 | return self._colspan
38 |
39 | @property
40 | def style(self) -> TableCellStyle | None:
41 | return self._style
42 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/ui/table_separator.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.cleo.ui.table_cell import TableCell
4 |
5 |
6 | class TableSeparator(TableCell):
7 | def __init__(self) -> None:
8 | super().__init__("")
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/cleo/ui/ui.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.cleo.exceptions import CleoValueError
4 | from conda_lock._vendor.cleo.ui.component import Component
5 |
6 |
7 | class UI:
8 | def __init__(self, components: list[Component] | None = None) -> None:
9 | self._components: dict[str, Component] = {}
10 |
11 | for component in components or []:
12 | self.register(component)
13 |
14 | def register(self, component: Component) -> None:
15 | if not isinstance(component, Component):
16 | raise CleoValueError(
17 | "A UI component must inherit from the Component class."
18 | )
19 |
20 | if not component.name:
21 | raise CleoValueError("A UI component cannot be anonymous.")
22 |
23 | self._components[component.name] = component
24 |
25 | def component(self, name: str) -> Component:
26 | if name not in self._components:
27 | raise CleoValueError(f'UI component "{name}" does not exist.')
28 |
29 | return self._components[name]
30 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License (https://en.wikipedia.org/wiki/ISC_license)
2 |
3 | Copyright (c) 2015, Kale Franz
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/__main__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Conda as a module entry point."""
4 |
5 | import sys
6 |
7 | from .cli import main
8 |
9 | sys.exit(main())
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Conda's pure-python dependencies will be
4 | `vendored `_
5 | until conda 5.0 when conda will be isolated in its own private environment.
6 |
7 | Introduction of dependencies for the 4.x series is discussed in
8 | https://github.com/conda/conda/issues/2825.
9 | """
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/appdirs.LICENSE.txt:
--------------------------------------------------------------------------------
1 | # This is the MIT license
2 |
3 | Copyright (c) 2010 ActiveState Software Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/cpuinfo/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | import sys
3 | from .cpuinfo import *
4 |
5 | from ...deprecations import deprecated
6 |
7 | deprecated.module("24.3", "24.9")
8 |
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/frozendict/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Santiago Lezica
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/py_cpuinfo.LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2022 Matthew Brennan Jones
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_vendor/vendor.txt:
--------------------------------------------------------------------------------
1 | appdirs==1.2.0
2 | py-cpuinfo==9.0.0
3 | distro==1.0.4
4 | frozendict==1.2
5 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/_version.py:
--------------------------------------------------------------------------------
1 | # file generated by setuptools-scm
2 | # don't change, don't track in version control
3 |
4 | __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5 |
6 | TYPE_CHECKING = False
7 | if TYPE_CHECKING:
8 | from typing import Tuple
9 | from typing import Union
10 |
11 | VERSION_TUPLE = Tuple[Union[int, str], ...]
12 | else:
13 | VERSION_TUPLE = object
14 |
15 | version: str
16 | __version__: str
17 | __version_tuple__: VERSION_TUPLE
18 | version_tuple: VERSION_TUPLE
19 |
20 | __version__ = version = '24.7.1'
21 | __version_tuple__ = version_tuple = (24, 7, 1)
22 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/appdirs.LICENSE.txt:
--------------------------------------------------------------------------------
1 | # This is the MIT license
2 |
3 | Copyright (c) 2010 ActiveState Software Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/auxlib/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License (https://en.wikipedia.org/wiki/ISC_license)
2 |
3 | Copyright (c) 2015, Kale Franz
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/base/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Code in ``conda.base`` is the lowest level of the application stack. It is loaded and executed
5 | virtually every time the application is executed. Any code within, and any of its imports, must
6 | be highly performant.
7 |
8 | Conda modules importable from ``conda.base`` are
9 |
10 | - ``conda._vendor``
11 | - ``conda.base``
12 | - ``conda.common``
13 |
14 | Modules prohibited from importing ``conda.base`` are:
15 |
16 | - ``conda._vendor``
17 | - ``conda.common``
18 |
19 | All other ``conda`` modules may import from ``conda.base``.
20 | """
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/base/exceptions.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Base exceptions."""
4 |
5 | from ..deprecations import deprecated
6 |
7 | deprecated.module("24.3", "24.9", addendum="Nothing to import.")
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from .main import main # NOQA
4 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/main_env_config.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """CLI implementation for `conda-env config`.
4 |
5 | Allows for programmatically interacting with conda-env's configuration files (e.g., `~/.condarc`).
6 | """
7 |
8 | from argparse import ArgumentParser, Namespace, _SubParsersAction
9 |
10 |
11 | def configure_parser(sub_parsers: _SubParsersAction, **kwargs) -> ArgumentParser:
12 | from ..auxlib.ish import dals
13 | from .main_env_vars import configure_parser as configure_vars_parser
14 |
15 | summary = "Configure a conda environment."
16 | description = summary
17 | epilog = dals(
18 | """
19 | Examples::
20 |
21 | conda env config vars list
22 | conda env config --append channels conda-forge
23 |
24 | """
25 | )
26 |
27 | p = sub_parsers.add_parser(
28 | "config",
29 | help=summary,
30 | description=description,
31 | epilog=epilog,
32 | **kwargs,
33 | )
34 | p.set_defaults(func="conda.cli.main_env_config.execute")
35 | config_subparser = p.add_subparsers()
36 | configure_vars_parser(config_subparser)
37 |
38 | return p
39 |
40 |
41 | def execute(args: Namespace, parser: ArgumentParser) -> int:
42 | parser.parse_args(["env", "config", "--help"])
43 |
44 | return 0
45 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/main_env_export.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """DEPRECATED: Use `conda.cli.main_export` instead.
4 |
5 | CLI implementation for `conda-env export`.
6 |
7 | Dumps specified environment package specifications to the screen.
8 | """
9 |
10 | # Import from conda.cli.main_export since this module is deprecated.
11 | from conda_lock._vendor.conda.cli.main_export import configure_parser, execute # noqa
12 | from conda_lock._vendor.conda.deprecations import deprecated
13 |
14 | deprecated.module("24.9", "25.3", addendum="Use `conda.cli.main_export` instead.")
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/main_mock_activate.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Mock CLI implementation for `conda activate`.
4 |
5 | A mock implementation of the activate shell command for better UX.
6 | """
7 |
8 | from argparse import SUPPRESS
9 |
10 | from .. import CondaError
11 |
12 |
13 | def configure_parser(sub_parsers):
14 | p = sub_parsers.add_parser(
15 | "activate",
16 | help="Activate a conda environment.",
17 | )
18 | p.set_defaults(func="conda.cli.main_mock_activate.execute")
19 | p.add_argument("args", action="store", nargs="*", help=SUPPRESS)
20 |
21 |
22 | def execute(args, parser):
23 | raise CondaError("Run 'conda init' before 'conda activate'")
24 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/main_mock_deactivate.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Mock CLI implementation for `conda deactivate`.
4 |
5 | A mock implementation of the deactivate shell command for better UX.
6 | """
7 |
8 | from .. import CondaError
9 |
10 |
11 | def configure_parser(sub_parsers):
12 | p = sub_parsers.add_parser(
13 | "deactivate",
14 | help="Deactivate the current active conda environment.",
15 | )
16 | p.set_defaults(func="conda.cli.main_mock_deactivate.execute")
17 |
18 |
19 | def execute(args, parser):
20 | raise CondaError("Run 'conda init' before 'conda deactivate'")
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/cli/main_pip.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """PEP 621 compatible entry point used when `conda init` has not updated the user shell profile."""
4 |
5 | import os
6 | import sys
7 | from logging import getLogger
8 |
9 | log = getLogger(__name__)
10 |
11 |
12 | def pip_installed_post_parse_hook(args, p):
13 | from .. import CondaError
14 |
15 | if args.cmd not in ("init", "info"):
16 | raise CondaError(
17 | "Conda has not been initialized.\n"
18 | "\n"
19 | "To enable full conda functionality, please run 'conda init'.\n"
20 | "For additional information, see 'conda init --help'.\n"
21 | )
22 |
23 |
24 | def main(*args, **kwargs):
25 | from .main import main
26 |
27 | os.environ["CONDA_PIP_UNINITIALIZED"] = "true"
28 | kwargs["post_parse_hook"] = pip_installed_post_parse_hook
29 | return main(*args, **kwargs)
30 |
31 |
32 | if __name__ == "__main__":
33 | sys.exit(main())
34 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Code in ``conda.common`` is not conda-specific. Technically, it sits *aside* the application
5 | stack and not *within* the stack. It is able to stand independently on its own.
6 | The *only* allowed imports of conda code in ``conda.common`` modules are imports of other
7 | ``conda.common`` modules and imports from ``conda._vendor``.
8 |
9 | If objects are needed from other parts of conda, they should be passed directly as arguments to
10 | functions and methods.
11 | """
12 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/_os/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from logging import getLogger
4 |
5 | from ..compat import on_win
6 |
7 | if on_win:
8 | from .windows import get_free_space_on_windows as get_free_space
9 | from .windows import is_admin_on_windows as is_admin
10 | else:
11 | from .unix import get_free_space_on_unix as get_free_space # noqa
12 | from .unix import is_admin_on_unix as is_admin # noqa
13 |
14 |
15 | log = getLogger(__name__)
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/_os/unix.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | import os
4 | from logging import getLogger
5 |
6 | log = getLogger(__name__)
7 |
8 |
9 | def get_free_space_on_unix(dir_name):
10 | st = os.statvfs(dir_name)
11 | return st.f_bavail * st.f_frsize
12 |
13 |
14 | def is_admin_on_unix():
15 | # http://stackoverflow.com/a/1026626/2127762
16 | return os.geteuid() == 0
17 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/constants.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Common constants."""
4 |
5 | from ..auxlib import NULL
6 |
7 | # Use this NULL object when needing to distinguish a value from None
8 | # For example, when parsing json, you may need to determine if a json key was given and set
9 | # to null, or the key didn't exist at all. There could be a bit of potential confusion here,
10 | # because in python null == None, while here I'm defining NULL to mean 'not defined'.
11 | NULL = NULL
12 |
13 | # Custom "trace" logging level for output more verbose than debug logs (logging.DEBUG == 10).
14 | TRACE = 5
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/decorators.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Common decorators."""
4 |
5 | import os
6 | from functools import wraps
7 |
8 | from ..deprecations import deprecated
9 |
10 | deprecated.module("24.3", "24.9")
11 |
12 |
13 | @deprecated("24.3", "24.9")
14 | def env_override(envvar_name, convert_empty_to_none=False):
15 | """Override the return value of the decorated function with an environment variable.
16 |
17 | If convert_empty_to_none is true, if the value of the environment variable
18 | is the empty string, a None value will be returned.
19 | """
20 |
21 | def decorator(func):
22 | @wraps(func)
23 | def wrapper(*args, **kwargs):
24 | value = os.environ.get(envvar_name, None)
25 |
26 | if value is not None:
27 | if value == "" and convert_empty_to_none:
28 | return None
29 | else:
30 | return value
31 | else:
32 | return func(*args, **kwargs)
33 |
34 | return wrapper
35 |
36 | return decorator
37 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/disk.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Common disk utilities."""
4 |
5 | from contextlib import contextmanager
6 | from os import unlink
7 |
8 | from ..auxlib.compat import Utf8NamedTemporaryFile
9 | from ..deprecations import deprecated
10 |
11 |
12 | @deprecated("24.3", "24.9", addendum="Use `tempfile` instead.")
13 | @contextmanager
14 | def temporary_content_in_file(content, suffix=""):
15 | # content returns temporary file path with contents
16 | fh = None
17 | path = None
18 | try:
19 | with Utf8NamedTemporaryFile(mode="w", delete=False, suffix=suffix) as fh:
20 | path = fh.name
21 | fh.write(content)
22 | fh.flush()
23 | fh.close()
24 | yield path
25 | finally:
26 | if fh is not None:
27 | fh.close()
28 | if path is not None:
29 | unlink(path)
30 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/iterators.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Replacements for parts of the toolz library."""
4 |
5 | from __future__ import annotations
6 |
7 | import collections
8 | import itertools
9 | from typing import TYPE_CHECKING
10 |
11 | if TYPE_CHECKING:
12 | from typing import Any, Generator, Sequence
13 |
14 |
15 | def groupby_to_dict(keyfunc, sequence):
16 | """A `toolz`-style groupby implementation.
17 |
18 | Returns a dictionary of { key: [group] } instead of iterators.
19 | """
20 | result = collections.defaultdict(list)
21 | for key, group in itertools.groupby(sequence, keyfunc):
22 | result[key].extend(group)
23 | return dict(result)
24 |
25 |
26 | def unique(sequence: Sequence[Any]) -> Generator[Any, None, None]:
27 | """A `toolz` inspired `unique` implementation.
28 |
29 | Returns a generator of unique elements in the sequence
30 | """
31 | seen: set[Any] = set()
32 | yield from (
33 | # seen.add always returns None so we will always return element
34 | seen.add(element) or element
35 | for element in sequence
36 | # only pass along novel elements
37 | if element not in seen
38 | )
39 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/common/pkg_formats/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/core/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Code in ``conda.core`` is the core logic. It is strictly forbidden from having side effects.
5 | No printing to stdout or stderr, no disk manipulation, no http requests.
6 | All side effects should be implemented through ``conda.gateways``. Objects defined in
7 | ``conda.models`` should be heavily preferred for ``conda.core`` function/method arguments
8 | and return values.
9 |
10 | Conda modules importable from ``conda.core`` are
11 |
12 | - ``conda._vendor``
13 | - ``conda.common``
14 | - ``conda.core``
15 | - ``conda.models``
16 | - ``conda.gateways``
17 |
18 | Conda modules strictly off limits for import within ``conda.core`` are
19 |
20 | - ``conda.api``
21 | - ``conda.cli``
22 | - ``conda.client``
23 |
24 | """
25 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/core/package_cache.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Backport of conda.core.package_cache_data for conda-build."""
4 |
5 | from ..deprecations import deprecated
6 | from .package_cache_data import ProgressiveFetchExtract
7 |
8 | deprecated.module(
9 | "24.3", "24.9", addendum="Use `conda.core.package_cache_data` instead."
10 | )
11 |
12 | ProgressiveFetchExtract = ProgressiveFetchExtract
13 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/env/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/env/installers/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/env/installers/base.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Dynamic installer loading."""
4 |
5 | import importlib
6 |
7 | from ...exceptions import InvalidInstaller
8 |
9 |
10 | def get_installer(name):
11 | """
12 | Gets the installer for the given environment.
13 |
14 | Raises: InvalidInstaller if unable to load installer
15 | """
16 | try:
17 | return importlib.import_module(f"conda.env.installers.{name}")
18 | except ImportError:
19 | raise InvalidInstaller(name)
20 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/env/specs/yaml_file.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Define YAML spec."""
4 |
5 | from ...exceptions import EnvironmentFileEmpty, EnvironmentFileNotFound
6 | from .. import env
7 |
8 |
9 | class YamlFileSpec:
10 | _environment = None
11 | extensions = {".yaml", ".yml"}
12 |
13 | def __init__(self, filename=None, **kwargs):
14 | self.filename = filename
15 | self.msg = None
16 |
17 | def can_handle(self):
18 | try:
19 | self._environment = env.from_file(self.filename)
20 | return True
21 | except EnvironmentFileNotFound as e:
22 | self.msg = str(e)
23 | return False
24 | except EnvironmentFileEmpty as e:
25 | self.msg = e.message
26 | return False
27 | except TypeError:
28 | self.msg = f"{self.filename} is not a valid yaml file."
29 | return False
30 |
31 | @property
32 | def environment(self):
33 | if not self._environment:
34 | self.can_handle()
35 | return self._environment
36 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/gateways/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Gateways isolate interaction of conda code with the outside world. Disk manipulation,
5 | database interaction, and remote requests should all be through various gateways. Functions
6 | and methods in ``conda.gateways`` must use ``conda.models`` for arguments and return values.
7 |
8 | Conda modules importable from ``conda.gateways`` are
9 |
10 | - ``conda._vendor``
11 | - ``conda.common``
12 | - ``conda.models``
13 | - ``conda.gateways``
14 |
15 | Conda modules off limits for import within ``conda.gateways`` are
16 |
17 | - ``conda.api``
18 | - ``conda.cli``
19 | - ``conda.client``
20 | - ``conda.core``
21 |
22 | Conda modules strictly prohibited from importing ``conda.gateways`` are
23 |
24 | - ``conda.api``
25 | - ``conda.cli``
26 | - ``conda.client``
27 |
28 | """
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/gateways/connection/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from requests import ConnectionError, HTTPError, Session # noqa: F401
4 | from requests.adapters import DEFAULT_POOLBLOCK, BaseAdapter, HTTPAdapter # noqa: F401
5 | from requests.auth import AuthBase, _basic_auth_str # noqa: F401
6 | from requests.cookies import extract_cookies_to_jar # noqa: F401
7 | from requests.exceptions import ( # noqa: F401
8 | ChunkedEncodingError,
9 | InvalidSchema,
10 | SSLError,
11 | )
12 | from requests.exceptions import ProxyError as RequestsProxyError # noqa: F401
13 | from requests.hooks import dispatch_hook # noqa: F401
14 | from requests.models import PreparedRequest, Response # noqa: F401
15 | from requests.packages.urllib3.exceptions import InsecureRequestWarning # noqa: F401
16 | from requests.packages.urllib3.util.retry import Retry # noqa: F401
17 | from requests.structures import CaseInsensitiveDict # noqa: F401
18 | from requests.utils import get_auth_from_url, get_netrc_auth # noqa: F401
19 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/gateways/connection/adapters/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/gateways/repodata/jlap/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Incremental repodata feature based on .jlap patch files."""
4 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/gateways/repodata/lock.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Backwards compatibility import.
5 |
6 | Moved to prevent circular imports.
7 | """
8 |
9 | from ..disk.lock import lock # noqa: F401
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/models/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """
4 | Models are data transfer objects or "light-weight" domain objects with no appreciable logic
5 | other than their own validation. Models are used to pass data between layers of the stack. In
6 | many ways they are similar to ORM objects. Unlike ORM objects, they are NOT themselves allowed
7 | to load data from a remote resource. Thought of another way, they cannot import from
8 | ``conda.gateways``, but rather ``conda.gateways`` imports from ``conda.models`` as appropriate
9 | to create model objects from remote resources.
10 |
11 | Conda modules importable from ``conda.models`` are
12 |
13 | - ``conda._vendor``
14 | - ``conda.common``
15 | - ``conda.models``
16 |
17 | """
18 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/models/leased_path_entry.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Implements object describing a symbolic link from the base environment to a private environment.
4 |
5 | Since private environments are an unrealized feature of conda and has been deprecated this data
6 | model no longer serves a purpose and has also been deprecated.
7 | """
8 |
9 | from logging import getLogger
10 |
11 | from ..auxlib.entity import Entity, EnumField, StringField
12 | from ..deprecations import deprecated
13 | from .enums import LeasedPathType
14 |
15 | log = getLogger(__name__)
16 |
17 |
18 | @deprecated("24.3", "24.9")
19 | class LeasedPathEntry(Entity):
20 | """
21 | _path: short path for the leased path, using forward slashes
22 | target_path: the full path to the executable in the private env
23 | target_prefix: the full path to the private environment
24 | leased_path: the full path for the lease in the root prefix
25 | package_name: the package holding the lease
26 | leased_path_type: application_entry_point
27 |
28 | """
29 |
30 | _path = StringField()
31 | target_path = StringField()
32 | target_prefix = StringField()
33 | leased_path = StringField()
34 | package_name = StringField()
35 | leased_path_type = EnumField(LeasedPathType)
36 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/notices/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from .core import notices # noqa: F401
4 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/post_solves/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Register the built-in post_solves hook implementations."""
4 |
5 | from . import signature_verification
6 |
7 | #: The list of post-solve plugins for easier registration with pluggy
8 | plugins = [signature_verification]
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/post_solves/signature_verification.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Register signature verification as a post-solve plugin."""
4 |
5 | from .. import CondaPostSolve, hookimpl
6 |
7 |
8 | @hookimpl
9 | def conda_post_solves():
10 | from ...trust.signature_verification import signature_verification
11 |
12 | yield CondaPostSolve(
13 | name="signature-verification",
14 | action=signature_verification,
15 | )
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/solvers.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Register the classic conda solver."""
4 |
5 | from ..base.constants import CLASSIC_SOLVER
6 | from . import CondaSolver, hookimpl
7 |
8 |
9 | @hookimpl(tryfirst=True) # make sure the classic solver can't be overwritten
10 | def conda_solvers():
11 | """The classic solver as shipped by default in conda."""
12 | from ..core.solve import Solver
13 |
14 | yield CondaSolver(
15 | name=CLASSIC_SOLVER,
16 | backend=Solver,
17 | )
18 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/subcommands/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from . import doctor
4 |
5 | plugins = [doctor]
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | from __future__ import annotations
4 |
5 | from . import archspec, conda, cuda, freebsd, linux, osx, windows
6 |
7 | #: The list of virtual package plugins for easier registration with pluggy
8 | plugins = [archspec, conda, cuda, freebsd, linux, osx, windows]
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/archspec.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Detect archspec name."""
4 |
5 | import os
6 |
7 | from .. import CondaVirtualPackage, hookimpl
8 |
9 |
10 | @hookimpl
11 | def conda_virtual_packages():
12 | from ...core.index import get_archspec_name
13 |
14 | archspec_name = get_archspec_name()
15 | archspec_name = os.getenv("CONDA_OVERRIDE_ARCHSPEC", archspec_name)
16 | if archspec_name:
17 | yield CondaVirtualPackage("archspec", "1", archspec_name)
18 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/conda.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Expose conda version."""
4 |
5 | from .. import CondaVirtualPackage, hookimpl
6 |
7 |
8 | @hookimpl
9 | def conda_virtual_packages():
10 | from ... import __version__
11 |
12 | yield CondaVirtualPackage("conda", __version__, None)
13 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/freebsd.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Detect whether this is FeeBSD."""
4 |
5 | from ...base.context import context
6 | from .. import CondaVirtualPackage, hookimpl
7 |
8 |
9 | @hookimpl
10 | def conda_virtual_packages():
11 | if not context.subdir.startswith("freebsd-"):
12 | return
13 |
14 | yield CondaVirtualPackage("unix", None, None)
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/osx.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Detect whether this is macOS."""
4 |
5 | import os
6 |
7 | from ...base.context import context
8 | from .. import CondaVirtualPackage, hookimpl
9 |
10 |
11 | @hookimpl
12 | def conda_virtual_packages():
13 | if not context.subdir.startswith("osx-"):
14 | return
15 |
16 | yield CondaVirtualPackage("unix", None, None)
17 |
18 | _, dist_version = context.os_distribution_name_version
19 | dist_version = os.environ.get("CONDA_OVERRIDE_OSX", dist_version)
20 | if dist_version:
21 | yield CondaVirtualPackage("osx", dist_version, None)
22 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/plugins/virtual_packages/windows.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Detect whether this is Windows."""
4 |
5 | from ...base.context import context
6 | from .. import CondaVirtualPackage, hookimpl
7 |
8 |
9 | @hookimpl
10 | def conda_virtual_packages():
11 | if not context.subdir.startswith("win-"):
12 | return
13 |
14 | yield CondaVirtualPackage("win", None, None)
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/conda/py.typed
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/py_cpuinfo.LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-2022 Matthew Brennan Jones
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/testing/cases.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Extends unittest.TestCase to include select pytest fixtures."""
4 |
5 | import unittest
6 |
7 | import pytest
8 |
9 |
10 | class BaseTestCase(unittest.TestCase):
11 | fixture_names = ("tmpdir",)
12 |
13 | @pytest.fixture(autouse=True)
14 | def auto_injector_fixture(self, request):
15 | names = self.fixture_names
16 | for name in names:
17 | setattr(self, name, request.getfixturevalue(name))
18 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/testing/gateways/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/testing/notices/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/testing/notices/fixtures.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 | """Collection of pytest fixtures used in conda.notices tests."""
4 |
5 | from pathlib import Path
6 | from unittest import mock
7 |
8 | import pytest
9 |
10 | from ...base.constants import NOTICES_CACHE_SUBDIR
11 | from ...cli.conda_argparse import generate_parser
12 |
13 |
14 | @pytest.fixture(scope="function")
15 | def notices_cache_dir(tmpdir):
16 | """
17 | Fixture that creates the notices cache dir while also mocking
18 | out a call to user_cache_dir.
19 | """
20 | with mock.patch("conda.notices.cache.user_cache_dir") as user_cache_dir:
21 | user_cache_dir.return_value = tmpdir
22 | cache_dir = Path(tmpdir).joinpath(NOTICES_CACHE_SUBDIR)
23 | cache_dir.mkdir(parents=True, exist_ok=True)
24 |
25 | yield cache_dir
26 |
27 |
28 | @pytest.fixture(scope="function")
29 | def notices_mock_fetch_get_session():
30 | with mock.patch("conda.notices.fetch.get_session") as mock_get_session:
31 | mock_get_session.return_value = mock.MagicMock()
32 | yield mock_get_session
33 |
34 |
35 | @pytest.fixture(scope="function")
36 | def conda_notices_args_n_parser():
37 | parser = generate_parser()
38 | args = parser.parse_args(["notices"])
39 |
40 | return args, parser
41 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/conda/trust/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 Anaconda, Inc
2 | # SPDX-License-Identifier: BSD-3-Clause
3 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/grayskull.pyi:
--------------------------------------------------------------------------------
1 | from grayskull import *
--------------------------------------------------------------------------------
/conda_lock/_vendor/grayskull/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = ["__version__"]
2 |
3 | try:
4 | from ._version import version as __version__
5 | except ImportError:
6 | __version__ = "unknown"
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/grayskull/strategy/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/grayskull/strategy/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry.LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-present Sébastien Eustace
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-present Sébastien Eustace
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/__main__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import sys
4 |
5 |
6 | if __name__ == "__main__":
7 | from conda_lock._vendor.poetry.console.application import main
8 |
9 | sys.exit(main())
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/__version__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.utils._compat import metadata
4 |
5 |
6 | __version__ = "2.0.1"
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/config/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/config/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/config/source.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import dataclasses
4 |
5 | from typing import TYPE_CHECKING
6 |
7 | from conda_lock._vendor.poetry.repositories.repository_pool import Priority
8 |
9 |
10 | if TYPE_CHECKING:
11 | from tomlkit.items import Table
12 |
13 |
14 | @dataclasses.dataclass(order=True, eq=True)
15 | class Source:
16 | name: str
17 | url: str = ""
18 | priority: Priority = (
19 | Priority.PRIMARY
20 | ) # cheating in annotation: str will be converted to Priority in __post_init__
21 |
22 | def __post_init__(self) -> None:
23 | if isinstance(self.priority, str):
24 | self.priority = Priority[self.priority.upper()]
25 |
26 | def to_dict(self) -> dict[str, str | bool]:
27 | return dataclasses.asdict(
28 | self,
29 | dict_factory=lambda x: {
30 | k: v if not isinstance(v, Priority) else v.name.lower()
31 | for (k, v) in x
32 | if v
33 | },
34 | )
35 |
36 | def to_toml_table(self) -> Table:
37 | from tomlkit import nl
38 | from tomlkit import table
39 |
40 | source_table: Table = table()
41 | for key, value in self.to_dict().items():
42 | source_table.add(key, value)
43 | source_table.add(nl())
44 | return source_table
45 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/command_loader.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.cleo.exceptions import CleoLogicError
6 | from conda_lock._vendor.cleo.loaders.factory_command_loader import FactoryCommandLoader
7 |
8 |
9 | if TYPE_CHECKING:
10 | from collections.abc import Callable
11 |
12 | from conda_lock._vendor.cleo.commands.command import Command
13 |
14 |
15 | class CommandLoader(FactoryCommandLoader):
16 | def register_factory(
17 | self, command_name: str, factory: Callable[[], Command]
18 | ) -> None:
19 | if command_name in self._factories:
20 | raise CleoLogicError(f'The command "{command_name}" already exists.')
21 |
22 | self._factories[command_name] = factory
23 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/about.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.console.commands.command import Command
4 |
5 |
6 | class AboutCommand(Command):
7 | name = "about"
8 |
9 | description = "Shows information about Poetry."
10 |
11 | def handle(self) -> int:
12 | from conda_lock._vendor.poetry.utils._compat import metadata
13 |
14 | self.line(
15 | f"""\
16 | Poetry - Package Management for Python
17 |
18 | Version: {metadata.version('poetry')}
19 | Poetry-Core Version: {metadata.version('poetry-core')}
20 |
21 | Poetry is a dependency manager tracking local dependencies of your projects\
22 | and libraries.
23 | See https://github.com/python-poetry/poetry> for more information.\
24 | """
25 | )
26 |
27 | return 0
28 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/cache/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/cache/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/cache/list.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.config.config import Config
4 | from conda_lock._vendor.poetry.console.commands.command import Command
5 |
6 |
7 | class CacheListCommand(Command):
8 | name = "cache list"
9 | description = "List Poetry's caches."
10 |
11 | def handle(self) -> int:
12 | config = Config.create()
13 | if config.repository_cache_directory.exists():
14 | caches = sorted(config.repository_cache_directory.iterdir())
15 | if caches:
16 | for cache in caches:
17 | self.line(f"{cache.name}>")
18 | return 0
19 |
20 | self.line_error("No caches found>")
21 | return 0
22 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/debug/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/debug/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/debug/info.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import sys
4 |
5 | from conda_lock._vendor.poetry.console.commands.command import Command
6 |
7 |
8 | class DebugInfoCommand(Command):
9 | name = "debug info"
10 | description = "Shows debug information."
11 |
12 | def handle(self) -> int:
13 | poetry_python_version = ".".join(str(s) for s in sys.version_info[:3])
14 |
15 | self.line("")
16 | self.line("Poetry")
17 | self.line(
18 | "\n".join(
19 | [
20 | f"Version: {self.poetry.VERSION}>",
21 | f"Python: {poetry_python_version}>",
22 | ]
23 | )
24 | )
25 | command = self.get_application().get("env info")
26 |
27 | exit_code: int = command.run(self.io)
28 | return exit_code
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/env/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/env/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/env/list.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 | from typing import ClassVar
5 |
6 | from conda_lock._vendor.cleo.helpers import option
7 |
8 | from conda_lock._vendor.poetry.console.commands.command import Command
9 |
10 |
11 | if TYPE_CHECKING:
12 | from conda_lock._vendor.cleo.io.inputs.option import Option
13 |
14 |
15 | class EnvListCommand(Command):
16 | name = "env list"
17 | description = "Lists all virtualenvs associated with the current project."
18 |
19 | options: ClassVar[list[Option]] = [
20 | option("full-path", None, "Output the full paths of the virtualenvs.")
21 | ]
22 |
23 | def handle(self) -> int:
24 | from conda_lock._vendor.poetry.utils.env import EnvManager
25 |
26 | manager = EnvManager(self.poetry)
27 | current_env = manager.get()
28 |
29 | for venv in manager.list():
30 | name = venv.path.name
31 | if self.option("full-path"):
32 | name = str(venv.path)
33 |
34 | if venv == current_env:
35 | self.line(f"{name} (Activated)")
36 |
37 | continue
38 |
39 | self.line(name)
40 |
41 | return 0
42 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/env/use.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 | from typing import ClassVar
5 |
6 | from conda_lock._vendor.cleo.helpers import argument
7 |
8 | from conda_lock._vendor.poetry.console.commands.command import Command
9 |
10 |
11 | if TYPE_CHECKING:
12 | from conda_lock._vendor.cleo.io.inputs.argument import Argument
13 |
14 |
15 | class EnvUseCommand(Command):
16 | name = "env use"
17 | description = "Activates or creates a new virtualenv for the current project."
18 |
19 | arguments: ClassVar[list[Argument]] = [
20 | argument("python", "The python executable to use.")
21 | ]
22 |
23 | def handle(self) -> int:
24 | from conda_lock._vendor.poetry.utils.env import EnvManager
25 |
26 | manager = EnvManager(self.poetry, io=self.io)
27 |
28 | if self.argument("python") == "system":
29 | manager.deactivate()
30 |
31 | return 0
32 |
33 | env = manager.activate(self.argument("python"))
34 |
35 | self.line(f"Using virtualenv: {env.path}>")
36 |
37 | return 0
38 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/env_command.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.console.commands.command import Command
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.utils.env import Env
10 |
11 |
12 | class EnvCommand(Command):
13 | def __init__(self) -> None:
14 | # Set in poetry.console.application.Application.configure_env
15 | self._env: Env | None = None
16 |
17 | super().__init__()
18 |
19 | @property
20 | def env(self) -> Env:
21 | assert self._env is not None
22 | return self._env
23 |
24 | def set_env(self, env: Env) -> None:
25 | self._env = env
26 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/installer_command.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.console.commands.env_command import EnvCommand
6 | from conda_lock._vendor.poetry.console.commands.group_command import GroupCommand
7 |
8 |
9 | if TYPE_CHECKING:
10 | from conda_lock._vendor.poetry.installation.installer import Installer
11 |
12 |
13 | class InstallerCommand(GroupCommand, EnvCommand):
14 | def __init__(self) -> None:
15 | # Set in poetry.console.application.Application.configure_installer
16 | self._installer: Installer | None = None
17 |
18 | super().__init__()
19 |
20 | def reset_poetry(self) -> None:
21 | super().reset_poetry()
22 |
23 | self.installer.set_package(self.poetry.package)
24 | self.installer.set_locker(self.poetry.locker)
25 |
26 | @property
27 | def installer(self) -> Installer:
28 | assert self._installer is not None
29 | return self._installer
30 |
31 | def set_installer(self, installer: Installer) -> None:
32 | self._installer = installer
33 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/self/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/self/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/self/lock.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.console.commands.lock import LockCommand
4 | from conda_lock._vendor.poetry.console.commands.self.self_command import SelfCommand
5 |
6 |
7 | class SelfLockCommand(SelfCommand, LockCommand):
8 | name = "self lock"
9 | description = "Lock the Poetry installation's system requirements."
10 | help = f"""\
11 | The self lock command reads this Poetry installation's system requirements as \
12 | specified in the {SelfCommand.get_default_system_pyproject_file()}> file.
13 |
14 | The system dependencies are locked in the \
15 | {SelfCommand.get_default_system_pyproject_file().parent.joinpath("poetry.lock")}> \
16 | file.
17 | """
18 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/self/remove.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 | from typing import ClassVar
5 |
6 | from conda_lock._vendor.poetry.console.commands.remove import RemoveCommand
7 | from conda_lock._vendor.poetry.console.commands.self.self_command import SelfCommand
8 |
9 |
10 | if TYPE_CHECKING:
11 | from conda_lock._vendor.cleo.io.inputs.option import Option
12 |
13 |
14 | class SelfRemoveCommand(SelfCommand, RemoveCommand):
15 | name = "self remove"
16 | description = "Remove additional packages from Poetry's runtime environment."
17 | options: ClassVar[list[Option]] = [
18 | o for o in RemoveCommand.options if o.name in {"dry-run"}
19 | ]
20 | help = f"""\
21 | The self remove command removes additional package's to Poetry's runtime \
22 | environment.
23 |
24 | This is managed in the {SelfCommand.get_default_system_pyproject_file()}> \
25 | file.
26 | """
27 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/self/sync.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 | from typing import ClassVar
5 |
6 | from conda_lock._vendor.poetry.console.commands.self.install import SelfInstallCommand
7 |
8 |
9 | if TYPE_CHECKING:
10 | from conda_lock._vendor.cleo.io.inputs.option import Option
11 |
12 |
13 | class SelfSyncCommand(SelfInstallCommand):
14 | name = "self sync"
15 | description = (
16 | "Sync Poetry's own environment according to the locked packages (incl. addons)"
17 | " required by this Poetry installation."
18 | )
19 | options: ClassVar[list[Option]] = [
20 | opt for opt in SelfInstallCommand.options if opt.name != "sync"
21 | ]
22 | help = f"""\
23 | The self sync command ensures all additional (and no other) packages \
24 | specified are installed in the current runtime environment.
25 |
26 | This is managed in the \
27 | {SelfInstallCommand.get_default_system_pyproject_file()}> file.
28 |
29 | You can add more packages using the self add command and remove them using \
30 | the self remove command.
31 | """
32 |
33 | @property
34 | def _with_synchronization(self) -> bool:
35 | return True
36 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/commands/source/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/commands/source/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/events/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/events/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/events/console_events.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/events/console_events.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.cleo.exceptions import CleoError
4 |
5 |
6 | class PoetryConsoleError(CleoError):
7 | pass
8 |
9 |
10 | class GroupNotFoundError(PoetryConsoleError):
11 | pass
12 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/io/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/io/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/io/inputs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/io/inputs/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/console/logging/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/filters.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import logging
4 |
5 |
6 | POETRY_FILTER = logging.Filter(name="poetry")
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/formatters/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.console.logging.formatters.builder_formatter import BuilderLogFormatter
4 |
5 |
6 | FORMATTERS = {
7 | "poetry.core.masonry.builders.builder": BuilderLogFormatter(),
8 | "poetry.core.masonry.builders.sdist": BuilderLogFormatter(),
9 | "poetry.core.masonry.builders.wheel": BuilderLogFormatter(),
10 | }
11 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/formatters/builder_formatter.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import re
4 |
5 | from conda_lock._vendor.poetry.console.logging.formatters.formatter import Formatter
6 |
7 |
8 | class BuilderLogFormatter(Formatter):
9 | def format(self, msg: str) -> str:
10 | if msg.startswith("Building "):
11 | msg = re.sub("Building (.+)", " - Building \\1", msg)
12 | elif msg.startswith("Built "):
13 | msg = re.sub("Built (.+)", " - Built \\1", msg)
14 | elif msg.startswith("Adding: "):
15 | msg = re.sub("Adding: (.+)", " - Adding: \\1", msg)
16 | elif msg.startswith("Executing build script: "):
17 | msg = re.sub(
18 | "Executing build script: (.+)",
19 | " - Executing build script: \\1",
20 | msg,
21 | )
22 |
23 | return msg
24 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/formatters/formatter.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from abc import ABC
4 | from abc import abstractmethod
5 |
6 |
7 | class Formatter(ABC):
8 | @abstractmethod
9 | def format(self, msg: str) -> str: ...
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/console/logging/io_handler.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import logging
4 |
5 | from typing import TYPE_CHECKING
6 |
7 |
8 | if TYPE_CHECKING:
9 | from logging import LogRecord
10 |
11 | from conda_lock._vendor.cleo.io.io import IO
12 |
13 |
14 | class IOHandler(logging.Handler):
15 | def __init__(self, io: IO) -> None:
16 | self._io = io
17 |
18 | super().__init__()
19 |
20 | def emit(self, record: LogRecord) -> None:
21 | try:
22 | msg = self.format(record)
23 | level = record.levelname.lower()
24 | err = level in ("warning", "error", "exception", "critical")
25 | if err:
26 | self._io.write_error_line(msg)
27 | else:
28 | self._io.write_line(msg)
29 | except Exception:
30 | self.handleError(record)
31 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import sys
4 |
5 | from pathlib import Path
6 |
7 |
8 | # this cannot presently be replaced with importlib.metadata.version as when building
9 | # itself, poetry-core is not available as an installed distribution.
10 | __version__ = "2.0.1"
11 |
12 | __vendor_site__ = (Path(__file__).parent / "_vendor").as_posix()
13 |
14 | if __vendor_site__ not in sys.path:
15 | sys.path.insert(0, __vendor_site__)
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/fastjsonschema/__main__.py:
--------------------------------------------------------------------------------
1 | import json
2 | import sys
3 |
4 | from . import compile_to_code
5 |
6 |
7 | def main():
8 | if len(sys.argv) == 2:
9 | definition = sys.argv[1]
10 | else:
11 | definition = sys.stdin.read()
12 |
13 | definition = json.loads(definition)
14 | code = compile_to_code(definition)
15 | print(code)
16 |
17 |
18 | if __name__ == '__main__':
19 | main()
20 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/fastjsonschema/indent.py:
--------------------------------------------------------------------------------
1 | def indent(func):
2 | """
3 | Decorator for allowing to use method as normal method or with
4 | context manager for auto-indenting code blocks.
5 | """
6 | def wrapper(self, line, *args, optimize=True, **kwds):
7 | last_line = self._indent_last_line
8 | line = func(self, line, *args, **kwds)
9 | # When two blocks have the same condition (such as value has to be dict),
10 | # do the check only once and keep it under one block.
11 | if optimize and last_line == line:
12 | self._code.pop()
13 | self._indent_last_line = line
14 | return Indent(self, line)
15 | return wrapper
16 |
17 |
18 | class Indent:
19 | def __init__(self, instance, line):
20 | self.instance = instance
21 | self.line = line
22 |
23 | def __enter__(self):
24 | self.instance._indent += 1
25 |
26 | def __exit__(self, type_, value, traceback):
27 | self.instance._indent -= 1
28 | self.instance._indent_last_line = self.line
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/fastjsonschema/version.py:
--------------------------------------------------------------------------------
1 | VERSION = '2.21.1'
2 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright © 2017 Erez Shinan
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/__init__.py:
--------------------------------------------------------------------------------
1 | from .exceptions import (
2 | GrammarError,
3 | LarkError,
4 | LexError,
5 | ParseError,
6 | UnexpectedCharacters,
7 | UnexpectedEOF,
8 | UnexpectedInput,
9 | UnexpectedToken,
10 | )
11 | from .lark import Lark
12 | from .lexer import Token
13 | from .tree import ParseTree, Tree
14 | from .utils import logger
15 | from .visitors import Discard, Transformer, Transformer_NonRecursive, Visitor, v_args
16 |
17 | __version__: str = "1.2.2"
18 |
19 | __all__ = (
20 | "GrammarError",
21 | "LarkError",
22 | "LexError",
23 | "ParseError",
24 | "UnexpectedCharacters",
25 | "UnexpectedEOF",
26 | "UnexpectedInput",
27 | "UnexpectedToken",
28 | "Lark",
29 | "Token",
30 | "ParseTree",
31 | "Tree",
32 | "logger",
33 | "Discard",
34 | "Transformer",
35 | "Transformer_NonRecursive",
36 | "Visitor",
37 | "v_args",
38 | )
39 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/__pyinstaller/__init__.py:
--------------------------------------------------------------------------------
1 | # For usage of lark with PyInstaller. See https://pyinstaller-sample-hook.readthedocs.io/en/latest/index.html
2 |
3 | import os
4 |
5 | def get_hook_dirs():
6 | return [os.path.dirname(__file__)]
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/__pyinstaller/hook-lark.py:
--------------------------------------------------------------------------------
1 | #-----------------------------------------------------------------------------
2 | # Copyright (c) 2017-2020, PyInstaller Development Team.
3 | #
4 | # Distributed under the terms of the GNU General Public License (version 2
5 | # or later) with exception for distributing the bootloader.
6 | #
7 | # The full license is in the file COPYING.txt, distributed with this software.
8 | #
9 | # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
10 | #-----------------------------------------------------------------------------
11 |
12 | from PyInstaller.utils.hooks import collect_data_files
13 |
14 | datas = collect_data_files('lark')
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/grammars/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/_vendor/lark/grammars/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/_vendor/lark/grammars/common.lark:
--------------------------------------------------------------------------------
1 | // Basic terminals for common use
2 |
3 |
4 | //
5 | // Numbers
6 | //
7 |
8 | DIGIT: "0".."9"
9 | HEXDIGIT: "a".."f"|"A".."F"|DIGIT
10 |
11 | INT: DIGIT+
12 | SIGNED_INT: ["+"|"-"] INT
13 | DECIMAL: INT "." INT? | "." INT
14 |
15 | // float = /-?\d+(\.\d+)?([eE][+-]?\d+)?/
16 | _EXP: ("e"|"E") SIGNED_INT
17 | FLOAT: INT _EXP | DECIMAL _EXP?
18 | SIGNED_FLOAT: ["+"|"-"] FLOAT
19 |
20 | NUMBER: FLOAT | INT
21 | SIGNED_NUMBER: ["+"|"-"] NUMBER
22 |
23 | //
24 | // Strings
25 | //
26 | _STRING_INNER: /.*?/
27 | _STRING_ESC_INNER: _STRING_INNER /(?= "3.9" and python_version < "4.0"
2 | lark==1.2.2 ; python_version >= "3.9" and python_version < "4.0"
3 | packaging==24.2 ; python_version >= "3.9" and python_version < "4.0"
4 | tomli==2.2.1 ; python_version >= "3.9" and python_version < "4.0"
5 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/constraints/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/constraints/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/constraints/generic/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.constraints.generic.any_constraint import AnyConstraint
4 | from conda_lock._vendor.poetry.core.constraints.generic.base_constraint import BaseConstraint
5 | from conda_lock._vendor.poetry.core.constraints.generic.constraint import Constraint
6 | from conda_lock._vendor.poetry.core.constraints.generic.empty_constraint import EmptyConstraint
7 | from conda_lock._vendor.poetry.core.constraints.generic.multi_constraint import MultiConstraint
8 | from conda_lock._vendor.poetry.core.constraints.generic.parser import parse_constraint
9 | from conda_lock._vendor.poetry.core.constraints.generic.union_constraint import UnionConstraint
10 |
11 |
12 | __all__ = (
13 | "AnyConstraint",
14 | "BaseConstraint",
15 | "Constraint",
16 | "EmptyConstraint",
17 | "MultiConstraint",
18 | "UnionConstraint",
19 | "parse_constraint",
20 | )
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/constraints/generic/base_constraint.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class BaseConstraint:
5 | def allows(self, other: BaseConstraint) -> bool:
6 | raise NotImplementedError
7 |
8 | def allows_all(self, other: BaseConstraint) -> bool:
9 | raise NotImplementedError
10 |
11 | def allows_any(self, other: BaseConstraint) -> bool:
12 | raise NotImplementedError
13 |
14 | def invert(self) -> BaseConstraint:
15 | raise NotImplementedError()
16 |
17 | def difference(self, other: BaseConstraint) -> BaseConstraint:
18 | raise NotImplementedError
19 |
20 | def intersect(self, other: BaseConstraint) -> BaseConstraint:
21 | raise NotImplementedError
22 |
23 | def union(self, other: BaseConstraint) -> BaseConstraint:
24 | raise NotImplementedError
25 |
26 | def is_any(self) -> bool:
27 | return False
28 |
29 | def is_empty(self) -> bool:
30 | return False
31 |
32 | def __repr__(self) -> str:
33 | return f"<{self.__class__.__name__} {self}>"
34 |
35 | def __str__(self) -> str:
36 | raise NotImplementedError
37 |
38 | def __hash__(self) -> int:
39 | raise NotImplementedError
40 |
41 | def __eq__(self, other: object) -> bool:
42 | raise NotImplementedError
43 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/constraints/version/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.constraints.version.empty_constraint import EmptyConstraint
4 | from conda_lock._vendor.poetry.core.constraints.version.parser import parse_constraint
5 | from conda_lock._vendor.poetry.core.constraints.version.parser import parse_marker_version_constraint
6 | from conda_lock._vendor.poetry.core.constraints.version.util import constraint_regions
7 | from conda_lock._vendor.poetry.core.constraints.version.version import Version
8 | from conda_lock._vendor.poetry.core.constraints.version.version_constraint import VersionConstraint
9 | from conda_lock._vendor.poetry.core.constraints.version.version_range import VersionRange
10 | from conda_lock._vendor.poetry.core.constraints.version.version_range_constraint import (
11 | VersionRangeConstraint,
12 | )
13 | from conda_lock._vendor.poetry.core.constraints.version.version_union import VersionUnion
14 |
15 |
16 | __all__ = (
17 | "EmptyConstraint",
18 | "Version",
19 | "VersionConstraint",
20 | "VersionRange",
21 | "VersionRangeConstraint",
22 | "VersionUnion",
23 | "constraint_regions",
24 | "parse_constraint",
25 | "parse_marker_version_constraint",
26 | )
27 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/constraints/version/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class ParseConstraintError(ValueError):
5 | pass
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/exceptions/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.exceptions.base import PoetryCoreError
4 |
5 |
6 | __all__ = ("PoetryCoreError",)
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/exceptions/base.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class PoetryCoreError(Exception):
5 | pass
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/json/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import json
4 |
5 | from importlib.resources import files
6 | from pathlib import Path
7 | from typing import TYPE_CHECKING
8 | from typing import Any
9 |
10 | import fastjsonschema
11 |
12 | from fastjsonschema.exceptions import JsonSchemaException
13 |
14 |
15 | if TYPE_CHECKING:
16 | from importlib.abc import Traversable
17 |
18 |
19 | SCHEMA_DIR = Path(__file__).parent / "schemas"
20 |
21 |
22 | def _get_schema_file(schema_name: str) -> Traversable:
23 | return files(__package__) / "schemas" / f"{schema_name}.json"
24 |
25 |
26 | class ValidationError(ValueError):
27 | pass
28 |
29 |
30 | def validate_object(obj: dict[str, Any], schema_name: str) -> list[str]:
31 | schema_file = _get_schema_file(schema_name)
32 |
33 | if not schema_file.is_file():
34 | raise ValueError(f"Schema {schema_name} does not exist.")
35 |
36 | with schema_file.open(encoding="utf-8") as f:
37 | schema = json.load(f)
38 |
39 | validate = fastjsonschema.compile(schema)
40 |
41 | errors = []
42 | try:
43 | validate(obj)
44 | except JsonSchemaException as e:
45 | errors = [e.message]
46 |
47 | return errors
48 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/masonry/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | This module handles the packaging and publishing
3 | of python projects.
4 |
5 | A lot of the code used here has been taken from
6 | `flit `__ and adapted
7 | to work with the poetry codebase, so kudos to them for showing the way.
8 | """
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/masonry/builders/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/masonry/builders/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/masonry/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/masonry/utils/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/masonry/utils/include.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 |
6 | if TYPE_CHECKING:
7 | from pathlib import Path
8 |
9 |
10 | class Include:
11 | """
12 | Represents an "include" entry.
13 |
14 | It can be a glob string, a single file or a directory.
15 |
16 | This class will then detect the type of this include:
17 |
18 | - a package
19 | - a module
20 | - a file
21 | - a directory
22 | """
23 |
24 | def __init__(self, base: Path, include: str, formats: list[str]) -> None:
25 | self._base = base
26 | self._include = str(include)
27 | self._formats = formats
28 |
29 | self._elements: list[Path] = sorted(self._base.glob(str(self._include)))
30 |
31 | @property
32 | def base(self) -> Path:
33 | return self._base
34 |
35 | @property
36 | def elements(self) -> list[Path]:
37 | return self._elements
38 |
39 | @property
40 | def formats(self) -> list[str]:
41 | return self._formats
42 |
43 | def is_empty(self) -> bool:
44 | return len(self._elements) == 0
45 |
46 | def refresh(self) -> Include:
47 | self._elements = sorted(self._base.glob(self._include))
48 |
49 | return self
50 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/packages/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/packages/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/packages/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/packages/utils/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/py.typed
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/pyproject/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/pyproject/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/pyproject/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.exceptions import PoetryCoreError
4 |
5 |
6 | class PyProjectError(PoetryCoreError):
7 | pass
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/spdx/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/spdx/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/spdx/updater.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import json
4 |
5 | from pathlib import Path
6 | from typing import Any
7 | from urllib.request import urlopen
8 |
9 |
10 | class Updater:
11 | BASE_URL = "https://raw.githubusercontent.com/spdx/license-list-data/master/json/"
12 |
13 | def __init__(self, base_url: str = BASE_URL) -> None:
14 | self._base_url = base_url
15 |
16 | def dump(self, file: Path | None = None) -> None:
17 | if file is None:
18 | file = Path(__file__).parent / "data" / "licenses.json"
19 |
20 | licenses_url = self._base_url + "licenses.json"
21 |
22 | with file.open("w", encoding="utf-8") as f:
23 | f.write(
24 | json.dumps(self.get_licenses(licenses_url), indent=2, sort_keys=True)
25 | )
26 |
27 | def get_licenses(self, url: str) -> dict[str, Any]:
28 | licenses = {}
29 | with urlopen(url) as r:
30 | data = json.loads(r.read().decode())
31 |
32 | for info in data["licenses"]:
33 | licenses[info["licenseId"]] = [
34 | info["name"],
35 | info["isOsiApproved"],
36 | info["isDeprecatedLicenseId"],
37 | ]
38 |
39 | return licenses
40 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/utils/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/utils/_compat.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import sys
4 |
5 |
6 | WINDOWS = sys.platform == "win32"
7 |
8 |
9 | if sys.version_info < (3, 11):
10 | # compatibility for python <3.11
11 | import tomli as tomllib
12 | else:
13 | import tomllib
14 |
15 | __all__ = ["tomllib"]
16 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/utils/patterns.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import re
4 |
5 |
6 | AUTHOR_REGEX = re.compile(r"(?u)^(?P[^<>]+)(?: <(?P.+?)>)?$")
7 |
8 | wheel_file_re = re.compile(
9 | r"""^(?P(?P.+?)(-(?P\d.+?))?)
10 | ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?)
11 | \.whl|\.dist-info)$""",
12 | re.VERBOSE,
13 | )
14 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/vcs/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import subprocess
4 |
5 | from typing import TYPE_CHECKING
6 |
7 | from conda_lock._vendor.poetry.core.vcs.git import Git
8 |
9 |
10 | if TYPE_CHECKING:
11 | from pathlib import Path
12 |
13 |
14 | def get_vcs(directory: Path) -> Git | None:
15 | directory = directory.resolve(strict=True)
16 | vcs: Git | None
17 |
18 | try:
19 | from conda_lock._vendor.poetry.core.vcs.git import executable
20 |
21 | check_ignore = subprocess.run(
22 | [executable(), "check-ignore", "."],
23 | stderr=subprocess.DEVNULL,
24 | stdout=subprocess.DEVNULL,
25 | cwd=directory,
26 | ).returncode
27 |
28 | if check_ignore == 0:
29 | vcs = None
30 | else:
31 | rel_path_to_git_dir = subprocess.check_output(
32 | [executable(), "rev-parse", "--show-cdup"],
33 | stderr=subprocess.STDOUT,
34 | text=True,
35 | encoding="utf-8",
36 | cwd=directory,
37 | ).strip()
38 |
39 | vcs = Git((directory / rel_path_to_git_dir).resolve())
40 |
41 | except (subprocess.CalledProcessError, OSError, RuntimeError):
42 | vcs = None
43 |
44 | return vcs
45 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/core/version/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class InvalidVersionError(ValueError):
5 | pass
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/grammars/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from pathlib import Path
4 |
5 |
6 | GRAMMAR_DIR = Path(__file__).parent
7 |
8 | GRAMMAR_PEP_508_CONSTRAINTS = GRAMMAR_DIR / "pep508.lark"
9 |
10 | GRAMMAR_PEP_508_MARKERS = GRAMMAR_DIR / "markers.lark"
11 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/grammars/markers.lark:
--------------------------------------------------------------------------------
1 | start: marker
2 |
3 | marker: _atom (BOOL_OP _atom)*
4 | _atom: item | (L_PAREN marker R_PAREN)
5 | item: (MARKER_NAME MARKER_OP _marker_value) | (_marker_value MARKER_OP MARKER_NAME)
6 | _marker_value: SINGLE_QUOTED_STRING | ESCAPED_STRING
7 |
8 | MARKER_NAME: "implementation_version"
9 | | "platform_python_implementation"
10 | | "implementation_name"
11 | | "python_full_version"
12 | | "platform_release"
13 | | "platform_version"
14 | | "platform_machine"
15 | | "platform_system"
16 | | "python_version"
17 | | "sys_platform"
18 | | "os_name"
19 | | "os.name"
20 | | "sys.platform"
21 | | "platform.version"
22 | | "platform.machine"
23 | | "platform.python_implementation"
24 | | "python_implementation"
25 | | "extra"
26 | MARKER_OP: "===" | "==" | ">=" | "<=" | ">" | "<" | "!=" | "~=" | "not in" | "in"
27 | SINGLE_QUOTED_STRING: /'([^'])*'/
28 | QUOTED_STRING: /"([^"])*"/
29 | MARKER_VALUE: /(.+?)/
30 | BOOL_OP: "and" | "or"
31 | L_PAREN: "("
32 | R_PAREN: ")"
33 |
34 | %import common.WS_INLINE
35 | %import common.ESCAPED_STRING
36 | %ignore WS_INLINE
37 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/parser.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 | from typing import Any
5 |
6 |
7 | if TYPE_CHECKING:
8 | from pathlib import Path
9 |
10 | from lark import Lark
11 | from lark import Tree
12 |
13 |
14 | class Parser:
15 | def __init__(
16 | self, grammar: Path, parser: str = "lalr", debug: bool = False
17 | ) -> None:
18 | self._grammar = grammar
19 | self._parser = parser
20 | self._debug = debug
21 | self._lark: Lark | None = None
22 |
23 | def parse(self, text: str, **kwargs: Any) -> Tree:
24 | from lark import Lark
25 |
26 | if self._lark is None:
27 | self._lark = Lark.open(
28 | grammar_filename=self._grammar, parser=self._parser, debug=self._debug
29 | )
30 |
31 | return self._lark.parse(text=text, **kwargs)
32 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/core/version/pep440/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.version.pep440.segments import LocalSegmentType
4 | from conda_lock._vendor.poetry.core.version.pep440.segments import Release
5 | from conda_lock._vendor.poetry.core.version.pep440.segments import ReleaseTag
6 | from conda_lock._vendor.poetry.core.version.pep440.version import PEP440Version
7 |
8 |
9 | __all__ = ("LocalSegmentType", "PEP440Version", "Release", "ReleaseTag")
10 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class PoetryError(Exception):
5 | pass
6 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/inspection/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/inspection/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/installation/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.installation.installer import Installer
4 |
5 |
6 | __all__ = ["Installer"]
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/installation/operations/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.installation.operations.install import Install
4 | from conda_lock._vendor.poetry.installation.operations.uninstall import Uninstall
5 | from conda_lock._vendor.poetry.installation.operations.update import Update
6 |
7 |
8 | __all__ = ["Install", "Uninstall", "Update"]
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/installation/operations/install.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.installation.operations.operation import Operation
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.core.packages.package import Package
10 |
11 |
12 | class Install(Operation):
13 | def __init__(
14 | self, package: Package, reason: str | None = None, priority: int = 0
15 | ) -> None:
16 | super().__init__(reason, priority=priority)
17 |
18 | self._package = package
19 |
20 | @property
21 | def package(self) -> Package:
22 | return self._package
23 |
24 | @property
25 | def job_type(self) -> str:
26 | return "install"
27 |
28 | def __str__(self) -> str:
29 | return (
30 | "Installing"
31 | f" {self.package.pretty_name} ({self.format_version(self.package)})"
32 | )
33 |
34 | def __repr__(self) -> str:
35 | return (
36 | ""
38 | )
39 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/installation/operations/uninstall.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.installation.operations.operation import Operation
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.core.packages.package import Package
10 |
11 |
12 | class Uninstall(Operation):
13 | def __init__(
14 | self,
15 | package: Package,
16 | reason: str | None = None,
17 | priority: float = float("inf"),
18 | ) -> None:
19 | super().__init__(reason, priority=priority)
20 |
21 | self._package = package
22 |
23 | @property
24 | def package(self) -> Package:
25 | return self._package
26 |
27 | @property
28 | def job_type(self) -> str:
29 | return "uninstall"
30 |
31 | def __str__(self) -> str:
32 | return (
33 | "Uninstalling"
34 | f" {self.package.pretty_name} ({self.format_version(self._package)})"
35 | )
36 |
37 | def __repr__(self) -> str:
38 | return (
39 | ""
41 | )
42 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/json/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import json
4 |
5 | from pathlib import Path
6 | from typing import Any
7 |
8 | import fastjsonschema
9 |
10 | from fastjsonschema.exceptions import JsonSchemaValueException
11 | from conda_lock._vendor.poetry.core.json import SCHEMA_DIR as CORE_SCHEMA_DIR
12 |
13 |
14 | SCHEMA_DIR = Path(__file__).parent / "schemas"
15 |
16 |
17 | def validate_object(obj: dict[str, Any]) -> list[str]:
18 | schema_file = Path(SCHEMA_DIR, "poetry.json")
19 | schema = json.loads(schema_file.read_text(encoding="utf-8"))
20 |
21 | validate = fastjsonschema.compile(schema)
22 |
23 | errors = []
24 | try:
25 | validate(obj)
26 | except JsonSchemaValueException as e:
27 | errors = [e.message]
28 |
29 | core_schema = json.loads(
30 | (CORE_SCHEMA_DIR / "poetry-schema.json").read_text(encoding="utf-8")
31 | )
32 |
33 | properties = schema["properties"].keys() | core_schema["properties"].keys()
34 | additional_properties = obj.keys() - properties
35 | for key in additional_properties:
36 | errors.append(f"Additional properties are not allowed ('{key}' was unexpected)")
37 |
38 | return errors
39 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/layouts/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.layouts.layout import Layout
4 | from conda_lock._vendor.poetry.layouts.src import SrcLayout
5 |
6 |
7 | _LAYOUTS = {"src": SrcLayout, "standard": Layout}
8 |
9 |
10 | def layout(name: str) -> type[Layout]:
11 | if name not in _LAYOUTS:
12 | raise ValueError("Invalid layout")
13 |
14 | return _LAYOUTS[name]
15 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/layouts/src.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from pathlib import Path
4 |
5 | from conda_lock._vendor.poetry.layouts.layout import Layout
6 |
7 |
8 | class SrcLayout(Layout):
9 | @property
10 | def basedir(self) -> Path:
11 | return Path("src")
12 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/locations.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import os
4 |
5 | from pathlib import Path
6 |
7 | from platformdirs import user_cache_path
8 | from platformdirs import user_config_path
9 | from platformdirs import user_data_path
10 |
11 |
12 | _APP_NAME = "pypoetry-conda-lock"
13 |
14 | DEFAULT_CACHE_DIR = user_cache_path(_APP_NAME, appauthor=False)
15 | CONFIG_DIR = Path(
16 | os.getenv("POETRY_CONFIG_DIR")
17 | or user_config_path(_APP_NAME, appauthor=False, roaming=True)
18 | )
19 |
20 |
21 | def data_dir() -> Path:
22 | if poetry_home := os.getenv("POETRY_HOME"):
23 | return Path(poetry_home).expanduser()
24 |
25 | return user_data_path(_APP_NAME, appauthor=False, roaming=True)
26 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/masonry/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/masonry/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/masonry/api.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.masonry.api import build_sdist
4 | from conda_lock._vendor.poetry.core.masonry.api import build_wheel
5 | from conda_lock._vendor.poetry.core.masonry.api import get_requires_for_build_sdist
6 | from conda_lock._vendor.poetry.core.masonry.api import get_requires_for_build_wheel
7 | from conda_lock._vendor.poetry.core.masonry.api import prepare_metadata_for_build_wheel
8 |
9 |
10 | __all__ = [
11 | "build_sdist",
12 | "build_wheel",
13 | "get_requires_for_build_sdist",
14 | "get_requires_for_build_wheel",
15 | "prepare_metadata_for_build_wheel",
16 | ]
17 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/masonry/builders/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.masonry.builders.sdist import SdistBuilder
4 | from conda_lock._vendor.poetry.core.masonry.builders.wheel import WheelBuilder
5 |
6 | from conda_lock._vendor.poetry.masonry.builders.editable import EditableBuilder
7 |
8 |
9 | __all__ = ["BUILD_FORMATS", "EditableBuilder"]
10 |
11 |
12 | # might be extended by plugins
13 | BUILD_FORMATS = {
14 | "sdist": SdistBuilder,
15 | "wheel": WheelBuilder,
16 | }
17 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/mixology/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.mixology.version_solver import VersionSolver
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.core.packages.project_package import ProjectPackage
10 |
11 | from conda_lock._vendor.poetry.mixology.result import SolverResult
12 | from conda_lock._vendor.poetry.puzzle.provider import Provider
13 |
14 |
15 | def resolve_version(root: ProjectPackage, provider: Provider) -> SolverResult:
16 | solver = VersionSolver(root, provider)
17 |
18 | return solver.solve()
19 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/mixology/result.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 |
6 | if TYPE_CHECKING:
7 | from conda_lock._vendor.poetry.core.packages.package import Package
8 | from conda_lock._vendor.poetry.core.packages.project_package import ProjectPackage
9 |
10 |
11 | class SolverResult:
12 | def __init__(
13 | self,
14 | root: ProjectPackage,
15 | packages: list[Package],
16 | attempted_solutions: int,
17 | ) -> None:
18 | self._root = root
19 | self._packages = packages
20 | self._attempted_solutions = attempted_solutions
21 |
22 | @property
23 | def packages(self) -> list[Package]:
24 | return self._packages
25 |
26 | @property
27 | def attempted_solutions(self) -> int:
28 | return self._attempted_solutions
29 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/mixology/set_relation.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class SetRelation:
5 | """
6 | An enum of possible relationships between two sets.
7 | """
8 |
9 | SUBSET = "subset"
10 |
11 | DISJOINT = "disjoint"
12 |
13 | OVERLAPPING = "overlapping"
14 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/packages/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.packages.dependency_package import DependencyPackage
4 | from conda_lock._vendor.poetry.packages.locker import Locker
5 | from conda_lock._vendor.poetry.packages.package_collection import PackageCollection
6 |
7 |
8 | __all__ = ["DependencyPackage", "Locker", "PackageCollection"]
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/packages/package_collection.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.packages.dependency_package import DependencyPackage
6 |
7 |
8 | if TYPE_CHECKING:
9 | from collections.abc import Iterable
10 |
11 | from conda_lock._vendor.poetry.core.packages.dependency import Dependency
12 | from conda_lock._vendor.poetry.core.packages.package import Package
13 |
14 |
15 | class PackageCollection(list[DependencyPackage]):
16 | def __init__(
17 | self,
18 | dependency: Dependency,
19 | packages: Iterable[Package | DependencyPackage] = (),
20 | ) -> None:
21 | self._dependency = dependency
22 |
23 | super().__init__()
24 |
25 | for package in packages:
26 | self.append(package)
27 |
28 | def append(self, package: Package | DependencyPackage) -> None:
29 | if isinstance(package, DependencyPackage):
30 | package = package.package
31 |
32 | package = DependencyPackage(self._dependency, package)
33 |
34 | return super().append(package)
35 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/packages/transitive_package_info.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from dataclasses import dataclass
4 | from typing import TYPE_CHECKING
5 |
6 | from conda_lock._vendor.poetry.core.version.markers import BaseMarker
7 | from conda_lock._vendor.poetry.core.version.markers import EmptyMarker
8 |
9 |
10 | if TYPE_CHECKING:
11 | from collections.abc import Iterable
12 |
13 |
14 | @dataclass
15 | class TransitivePackageInfo:
16 | depth: int # max depth in the dependency tree
17 | groups: set[str]
18 | markers: dict[str, BaseMarker] # group -> marker
19 |
20 | def get_marker(self, groups: Iterable[str]) -> BaseMarker:
21 | marker: BaseMarker = EmptyMarker()
22 | for group in groups:
23 | if group_marker := self.markers.get(group):
24 | marker = marker.union(group_marker)
25 | return marker
26 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/plugins/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.plugins.application_plugin import ApplicationPlugin
4 | from conda_lock._vendor.poetry.plugins.plugin import Plugin
5 |
6 |
7 | __all__ = ["ApplicationPlugin", "Plugin"]
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/plugins/application_plugin.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.plugins.base_plugin import BasePlugin
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.console.application import Application
10 | from conda_lock._vendor.poetry.console.commands.command import Command
11 |
12 |
13 | class ApplicationPlugin(BasePlugin):
14 | """
15 | Base class for application plugins.
16 | """
17 |
18 | group = "poetry.application.plugin"
19 |
20 | @property
21 | def commands(self) -> list[type[Command]]:
22 | return []
23 |
24 | def activate(self, application: Application) -> None:
25 | for command in self.commands:
26 | assert command.name is not None
27 | application.command_loader.register_factory(command.name, command)
28 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/plugins/base_plugin.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from abc import ABC
4 | from abc import abstractmethod
5 |
6 |
7 | class BasePlugin(ABC):
8 | """
9 | Base class for all plugin types
10 |
11 | The `activate()` method must be implemented and receives the Poetry instance.
12 | """
13 |
14 | PLUGIN_API_VERSION = "1.0.0"
15 |
16 | @property
17 | @abstractmethod
18 | def group(self) -> str:
19 | """
20 | Name of entrypoint group the plugin belongs to.
21 | """
22 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/plugins/plugin.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from abc import abstractmethod
4 | from typing import TYPE_CHECKING
5 |
6 | from conda_lock._vendor.poetry.plugins.base_plugin import BasePlugin
7 |
8 |
9 | if TYPE_CHECKING:
10 | from conda_lock._vendor.cleo.io.io import IO
11 |
12 | from conda_lock._vendor.poetry.poetry import Poetry
13 |
14 |
15 | class Plugin(BasePlugin):
16 | """
17 | Generic plugin not related to the console application.
18 | """
19 |
20 | group = "poetry.plugin"
21 |
22 | @abstractmethod
23 | def activate(self, poetry: Poetry, io: IO) -> None: ...
24 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/puzzle/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.puzzle.solver import Solver
4 |
5 |
6 | __all__ = ["Solver"]
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/puzzle/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 |
6 | if TYPE_CHECKING:
7 | from conda_lock._vendor.poetry.core.packages.dependency import Dependency
8 | from conda_lock._vendor.poetry.core.packages.package import Package
9 |
10 | from conda_lock._vendor.poetry.mixology.failure import SolveFailureError
11 |
12 |
13 | class SolverProblemError(Exception):
14 | def __init__(self, error: SolveFailureError) -> None:
15 | self._error = error
16 |
17 | super().__init__(str(error))
18 |
19 | @property
20 | def error(self) -> SolveFailureError:
21 | return self._error
22 |
23 |
24 | class OverrideNeededError(Exception):
25 | def __init__(self, *overrides: dict[Package, dict[str, Dependency]]) -> None:
26 | self._overrides = overrides
27 |
28 | @property
29 | def overrides(self) -> tuple[dict[Package, dict[str, Dependency]], ...]:
30 | return self._overrides
31 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/py.typed
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/pyproject/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/pyproject/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.repositories.repository import Repository
4 | from conda_lock._vendor.poetry.repositories.repository_pool import RepositoryPool
5 |
6 |
7 | __all__ = ["Repository", "RepositoryPool"]
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/abstract_repository.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from abc import ABC
4 | from abc import abstractmethod
5 | from typing import TYPE_CHECKING
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.core.constraints.version import Version
10 | from conda_lock._vendor.poetry.core.packages.dependency import Dependency
11 | from conda_lock._vendor.poetry.core.packages.package import Package
12 |
13 |
14 | class AbstractRepository(ABC):
15 | def __init__(self, name: str) -> None:
16 | self._name = name
17 |
18 | @property
19 | def name(self) -> str:
20 | return self._name
21 |
22 | @abstractmethod
23 | def find_packages(self, dependency: Dependency) -> list[Package]: ...
24 |
25 | @abstractmethod
26 | def search(self, query: str | list[str]) -> list[Package]: ...
27 |
28 | @abstractmethod
29 | def package(
30 | self,
31 | name: str,
32 | version: Version,
33 | extras: list[str] | None = None,
34 | ) -> Package: ...
35 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 |
4 | class RepositoryError(Exception):
5 | pass
6 |
7 |
8 | class PackageNotFoundError(Exception):
9 | pass
10 |
11 |
12 | class InvalidSourceError(Exception):
13 | pass
14 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/link_sources/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/repositories/link_sources/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/lockfile_repository.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.repositories import Repository
6 |
7 |
8 | if TYPE_CHECKING:
9 | from conda_lock._vendor.poetry.core.packages.package import Package
10 |
11 |
12 | class LockfileRepository(Repository):
13 | """
14 | Special repository that distinguishes packages not only by name and version,
15 | but also by source type, url, etc.
16 | """
17 |
18 | def __init__(self) -> None:
19 | super().__init__("poetry-lockfile")
20 |
21 | def has_package(self, package: Package) -> bool:
22 | return any(p == package for p in self.packages)
23 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/parsers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/repositories/parsers/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/parsers/html_page_parser.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from html.parser import HTMLParser
4 |
5 |
6 | class HTMLPageParser(HTMLParser):
7 | def __init__(self) -> None:
8 | super().__init__()
9 | self.base_url: str | None = None
10 | self.anchors: list[dict[str, str | None]] = []
11 |
12 | def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
13 | if tag == "base" and self.base_url is None:
14 | base_url = dict(attrs).get("href")
15 | if base_url is not None:
16 | self.base_url = base_url
17 | elif tag == "a":
18 | self.anchors.append(dict(attrs))
19 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/repositories/single_page_repository.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from conda_lock._vendor.poetry.repositories.exceptions import PackageNotFoundError
6 | from conda_lock._vendor.poetry.repositories.legacy_repository import LegacyRepository
7 | from conda_lock._vendor.poetry.repositories.link_sources.html import HTMLPage
8 |
9 |
10 | if TYPE_CHECKING:
11 | from packaging.utils import NormalizedName
12 |
13 |
14 | class SinglePageRepository(LegacyRepository):
15 | def _get_page(self, name: NormalizedName) -> HTMLPage:
16 | """
17 | Single page repositories only have one page irrespective of endpoint.
18 | """
19 | response = self._get_response("")
20 | if not response:
21 | raise PackageNotFoundError(f"Package [{name}] not found.")
22 | return HTMLPage(response.url, response.text)
23 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/toml/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.toml.exceptions import TOMLError
4 | from conda_lock._vendor.poetry.toml.file import TOMLFile
5 |
6 |
7 | __all__ = ["TOMLError", "TOMLFile"]
8 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/toml/exceptions.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.core.exceptions import PoetryCoreError
4 | from tomlkit.exceptions import TOMLKitError
5 |
6 |
7 | class TOMLError(TOMLKitError, PoetryCoreError):
8 | pass
9 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/toml/file.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from typing import TYPE_CHECKING
4 |
5 | from tomlkit.toml_file import TOMLFile as BaseTOMLFile
6 |
7 |
8 | if TYPE_CHECKING:
9 | from pathlib import Path
10 |
11 | from tomlkit.toml_document import TOMLDocument
12 |
13 |
14 | class TOMLFile(BaseTOMLFile):
15 | def __init__(self, path: Path) -> None:
16 | super().__init__(path)
17 | self.__path = path
18 |
19 | @property
20 | def path(self) -> Path:
21 | return self.__path
22 |
23 | def exists(self) -> bool:
24 | return self.__path.exists()
25 |
26 | def read(self) -> TOMLDocument:
27 | from tomlkit.exceptions import TOMLKitError
28 |
29 | from conda_lock._vendor.poetry.toml import TOMLError
30 |
31 | try:
32 | return super().read()
33 | except (ValueError, TOMLKitError) as e:
34 | raise TOMLError(f"Invalid TOML file {self.path.as_posix()}: {e}")
35 |
36 | def __str__(self) -> str:
37 | return self.__path.as_posix()
38 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/utils/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/utils/constants.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import os
4 |
5 |
6 | # Timeout for HTTP requests using the requests library.
7 | REQUESTS_TIMEOUT = int(os.getenv("POETRY_REQUESTS_TIMEOUT", 15))
8 |
9 | RETRY_AFTER_HEADER = "retry-after"
10 |
11 | # Server response codes to retry requests on.
12 | STATUS_FORCELIST = [429, 500, 501, 502, 503, 504]
13 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/utils/patterns.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import re
4 |
5 |
6 | wheel_file_re = re.compile(
7 | r"^(?P(?P.+?)-(?P\d[^-]*))"
8 | r"(-(?P\d[^-]*))?"
9 | r"-(?P[^-]+)"
10 | r"-(?P[^-]+)"
11 | r"-(?P[^-]+)"
12 | r"\.whl$",
13 | re.VERBOSE,
14 | )
15 |
16 | sdist_file_re = re.compile(
17 | r"^(?P(?P.+?)-(?P\d[^-]*?))"
18 | r"(\.sdist)?\.(?P(zip|tar(\.(gz|bz2|xz|Z))?))$"
19 | )
20 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/vcs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/vcs/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/vcs/git/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from conda_lock._vendor.poetry.vcs.git.backend import Git
4 |
5 |
6 | __all__ = ["Git"]
7 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry/version/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/_vendor/poetry/version/__init__.py
--------------------------------------------------------------------------------
/conda_lock/_vendor/poetry_core.LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020 Sébastien Eustace
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/conda_lock/_vendor/vendor.txt:
--------------------------------------------------------------------------------
1 | # Poetry-related:
2 | cleo==2.1.0
3 | poetry==2.0.1
4 | poetry-core==2.0.1
5 | grayskull==2.9.1
6 |
7 | # install conda from github since it's not available on pypi
8 | git+https://github.com/conda/conda.git@24.7.1
9 |
--------------------------------------------------------------------------------
/conda_lock/click_helpers.py:
--------------------------------------------------------------------------------
1 | from collections import OrderedDict
2 | from typing import Any, Dict, Optional
3 |
4 | import click
5 |
6 | from click_default_group import DefaultGroup
7 |
8 |
9 | class OrderedGroup(DefaultGroup):
10 | def __init__(
11 | self,
12 | name: Optional[str] = None,
13 | commands: Optional[Dict[str, click.Command]] = None,
14 | **kwargs: Any,
15 | ):
16 | super().__init__(name, commands, **kwargs)
17 | #: the registered subcommands by their exported names.
18 | self.commands = commands or OrderedDict()
19 |
20 | def list_commands(self, ctx: click.Context) -> Dict[str, click.Command]:
21 | return self.commands
22 |
--------------------------------------------------------------------------------
/conda_lock/errors.py:
--------------------------------------------------------------------------------
1 | class CondaLockError(Exception):
2 | """
3 | Generic conda-lock error.
4 | """
5 |
6 |
7 | class PlatformValidationError(CondaLockError):
8 | """
9 | Error that is thrown when trying to install a lockfile that was built
10 | for a different platform.
11 | """
12 |
13 |
14 | class MissingEnvVarError(CondaLockError):
15 | """
16 | Error thrown if env vars are missing in channel urls.
17 | """
18 |
19 |
20 | class ChannelAggregationError(CondaLockError):
21 | """
22 | Error thrown when lists of channels cannot be combined
23 | """
24 |
--------------------------------------------------------------------------------
/conda_lock/interfaces/vendored_conda.py:
--------------------------------------------------------------------------------
1 | from conda_lock._vendor.conda.common.toposort import toposort
2 | from conda_lock._vendor.conda.common.url import (
3 | mask_anaconda_token,
4 | split_anaconda_token,
5 | )
6 | from conda_lock._vendor.conda.models.match_spec import MatchSpec
7 |
8 |
9 | __all__ = ["MatchSpec", "mask_anaconda_token", "split_anaconda_token", "toposort"]
10 |
--------------------------------------------------------------------------------
/conda_lock/interfaces/vendored_grayskull.py:
--------------------------------------------------------------------------------
1 | from conda_lock._vendor.grayskull.strategy.parse_poetry_version import (
2 | encode_poetry_version,
3 | )
4 |
5 |
6 | __all__ = ["encode_poetry_version"]
7 |
--------------------------------------------------------------------------------
/conda_lock/interfaces/vendored_poetry_markers.py:
--------------------------------------------------------------------------------
1 | from conda_lock._vendor.poetry.core.version.markers import (
2 | AnyMarker,
3 | BaseMarker,
4 | EmptyMarker,
5 | MarkerUnion,
6 | MultiMarker,
7 | SingleMarker,
8 | parse_marker,
9 | )
10 |
11 |
12 | __all__ = [
13 | "AnyMarker",
14 | "BaseMarker",
15 | "EmptyMarker",
16 | "MarkerUnion",
17 | "MultiMarker",
18 | "SingleMarker",
19 | "parse_marker",
20 | ]
21 |
--------------------------------------------------------------------------------
/conda_lock/lockfile/v1/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/lockfile/v1/__init__.py
--------------------------------------------------------------------------------
/conda_lock/lockfile/v2prelim/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/conda_lock/lockfile/v2prelim/__init__.py
--------------------------------------------------------------------------------
/conda_lock/models/__init__.py:
--------------------------------------------------------------------------------
1 | from pydantic import BaseModel
2 |
3 |
4 | class StrictModel(BaseModel, extra="forbid"):
5 | """A Pydantic BaseModel forbidding extra fields"""
6 |
--------------------------------------------------------------------------------
/conda_lock/src_parser/conda_common.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 |
3 | from conda_lock._vendor.conda.models.channel import Channel
4 | from conda_lock._vendor.conda.models.match_spec import MatchSpec
5 | from conda_lock.models.lock_spec import VersionedDependency
6 |
7 |
8 | def conda_spec_to_versioned_dep(spec: str, category: str) -> VersionedDependency:
9 | """Convert a string form conda spec into a versioned dependency for a given category.
10 |
11 | This is used by the environment.yaml and meta.yaml specification parser
12 | """
13 |
14 | try:
15 | ms = MatchSpec(spec) # pyright: ignore # This is done in the metaclass for the matchspec
16 | except Exception as e:
17 | raise RuntimeError(f"Failed to turn `{spec}` into a MatchSpec") from e
18 |
19 | package_channel: Optional[Channel] = ms.get("channel")
20 | if package_channel:
21 | channel_str = package_channel.canonical_name
22 | else:
23 | channel_str = None
24 | return VersionedDependency(
25 | name=ms.name,
26 | version=ms.get("version") or "",
27 | manager="conda",
28 | category=category,
29 | extras=[],
30 | build=ms.get("build"),
31 | conda_channel=channel_str,
32 | )
33 |
--------------------------------------------------------------------------------
/docs/cli/gen.md:
--------------------------------------------------------------------------------
1 | # CLI Reference
2 |
3 | This is an automatically generated api doc of the flags and arguments that can be passed to conda-lock
4 | and its various subcommands.
5 |
6 | ::: mkdocs-click
7 | :module: conda_lock.conda_lock
8 | :command: main
9 | :prog_name: conda-lock
10 | :style: table
11 | :depth: 1
12 |
--------------------------------------------------------------------------------
/docs/getting_started.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | conda-lock is available through `pip`, `conda` and `mamba`.
4 |
5 | === "pip"
6 |
7 | ```sh
8 | pip install conda-lock
9 | ```
10 |
11 | === "conda"
12 |
13 | ```sh
14 | conda install -c conda-forge conda-lock
15 | ```
16 |
17 | === "mamba"
18 |
19 | ```sh
20 | mamba install -c conda-forge conda-lock
21 | ```
22 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc
4 | ---
5 |
6 | # conda-lock
7 |
8 | Conda lock is a lightweight library that can be used to generate fully reproducible lock files for conda environments.
9 |
10 | It does this by performing multiple solves for conda/mamba targeting a set of platforms you desire lockfiles for.
11 |
12 | This also has the added benefit of acting as an external presolve for conda as the lockfiles it generates
13 | results in the conda solver **not** being invoked when installing the packages from the generated lockfile.
14 |
15 | ## Features
16 |
17 | * Unified lockfile format
18 | * Integrated pip support
19 | * Support for a variety of source formats
20 | * conda environment.yml
21 | * conda meta.yaml
22 | * pyproject.toml (poetry, flit, pep 621)
23 | * Solveless conda installation
24 |
--------------------------------------------------------------------------------
/environments/README.md:
--------------------------------------------------------------------------------
1 | # Conda environment specifications
2 |
3 | Our development dependencies are specified in [`dev-environment.yaml`](dev-environment.yaml).
4 |
5 | The lockfile [`conda-lock.yml`](conda-lock.yml) is regularly updated using `conda-lock`
6 | via the [`update-lockfile.yaml`](../.github/workflows/update-lockfile.yaml) GHA workflow.
7 | In particular, the lockfile is generated based on the project dependencies specified in
8 | [`pyproject.toml`](../pyproject.toml) the development dependencies specified in
9 | [`dev-environment.yml`](dev-environment.yml).
10 |
--------------------------------------------------------------------------------
/environments/conda-lock.yml:
--------------------------------------------------------------------------------
1 | conda-lock-python-3.13.yaml
--------------------------------------------------------------------------------
/environments/dev-environment.yaml:
--------------------------------------------------------------------------------
1 | # Here we specify the development dependencies.
2 |
3 | # The main project dependencies are specified independently in pyproject.toml.
4 |
5 | name: conda-lock-dev
6 | category: dev
7 | channels:
8 | # The maresb channel has builds for mamba v1 on Python 3.13.
9 | #
10 | - maresb
11 | - conda-forge
12 | - nodefaults
13 | dependencies:
14 | - check-manifest
15 | - docker-py
16 | - doctr
17 | - flaky
18 | - freezegun
19 | - gitpython
20 | - mamba
21 | - mkdocs
22 | - mkdocs-click
23 | - mkdocs-material
24 | - mkdocs-include-markdown-plugin
25 | - mypy
26 | - pip
27 | - pre-commit
28 | - pytest
29 | - pytest-cov
30 | - pytest-split
31 | - pytest-timeout
32 | - pytest-xdist
33 | - python-build
34 | - requests-mock
35 | - ruff
36 | - tomli
37 | - twine
38 | - types-click
39 | - types-click-default-group
40 | - types-filelock
41 | - types-requests
42 | - types-toml
43 | - types-pyyaml
44 | - types-freezegun
45 | - types-setuptools
46 | - wheel
47 |
--------------------------------------------------------------------------------
/environments/python-3.13.yaml:
--------------------------------------------------------------------------------
1 | name: conda-lock-dev
2 | category: dev
3 | channels:
4 | - conda-forge
5 | - nodefaults
6 | dependencies:
7 | - python =3.13.*
8 |
--------------------------------------------------------------------------------
/environments/python-3.9.yaml:
--------------------------------------------------------------------------------
1 | name: conda-lock-dev
2 | category: dev
3 | channels:
4 | - conda-forge
5 | - nodefaults
6 | dependencies:
7 | - python =3.9.*
8 |
--------------------------------------------------------------------------------
/example/pangeo/environment.yml:
--------------------------------------------------------------------------------
1 | name: pangeo
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - python
6 | - bokeh
7 | - cartopy
8 | - cython
9 | - dask
10 | - dask-cloudprovider
11 | - erddapy
12 | - numpy
13 | - python-blosc
14 | - hvplot
15 | - h5py
16 | - h5netcdf
17 | - ipykernel
18 | - ipywidgets
19 | - geoviews
20 | - holoviews
21 | - lz4
22 | - datashader
23 | - panel
24 | - metpy
25 | - netcdf4
26 | - xarray
27 | - s3fs
28 | - gcsfs
29 | - fsspec
30 | - utide
31 | - zarr
32 | - earthsim
--------------------------------------------------------------------------------
/example/zlib/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | - defaults
4 | dependencies:
5 | - zlib
6 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | command = "bash <(curl -L micro.mamba.pm/install.sh) && source ~/.bashrc && micromamba install --name base --file environments/conda-lock.yml --category main dev && micromamba activate base && pip install . && mkdocs build"
3 | publish = "site"
4 |
--------------------------------------------------------------------------------
/pyrightconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "ignore": [
3 | "conda_lock/_vendor/conda/**",
4 | "conda_lock/_vendor/cleo/**",
5 | "conda_lock/_vendor/poetry_core/**",
6 | "conda_lock/_vendor/poetry/**",
7 | ],
8 | "reportUnusedImport": "error",
9 | }
10 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:base"
5 | ],
6 | "packageRules": [
7 | {
8 | "matchManagers": ["setup-cfg", "pip_requirements"],
9 | "enabled": true,
10 | "rangeStrategy": "replace"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Support scripts
2 |
3 | Currently we have just one script: `rerun_vendoring.sh`.
4 |
5 | [vendoring](https://github.com/pradyunsg/vendoring) is a tool for vendoring dependencies into `conda_lock/_vendor`, namely Poetry and Conda.
6 | We have to do some additional cleanup due to the fact that the packages we vendor have vendored dependencies of their own.
7 | This script makes that cleanup reproducible.
8 | See the `[tool.vendoring]` section of `pyproject.toml` for details.
9 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/tests/__init__.py
--------------------------------------------------------------------------------
/tests/durations/README.md:
--------------------------------------------------------------------------------
1 | # pytest-split durations
2 |
3 | This directory contains test durations as they were computed by pytest-split
4 | running from GitHub Actions.
5 |
6 | They should occasionally be replaced so that the split remains optimal.
7 | (Tests that are missing from this list will be assigned the average duration.)
8 |
9 | The JSON files are generated during the pytest runs on GitHub.
10 | They are aggregated in the "Aggregate test durations" job, and available for download as the `aggregated-test-durations` artifact.
11 |
12 | For more details, see the
13 | [pytest-split documentation](https://jerry-git.github.io/pytest-split/).
14 |
--------------------------------------------------------------------------------
/tests/gdal/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | - defaults
4 | dependencies:
5 | # purposefully using a badly formatted environment.yaml here
6 | - python >= 3.8, < 3.9
7 | - gdal
8 | - pip:
9 | - toolz
10 |
--------------------------------------------------------------------------------
/tests/quetz/dev_config.toml:
--------------------------------------------------------------------------------
1 | [github]
2 | # Register the app here: https://github.com/settings/applications/new
3 | # Use a callback URL like `http://localhost:8000/auth/github/authorize`
4 | client_id = "37cdbb80c7733e2a1831"
5 | client_secret = "75e648e981545902ab7802de94e2f2707c8e0ff8"
6 |
7 | [sqlalchemy]
8 | database_url = "sqlite:///./quetz.sqlite"
9 |
10 | [session]
11 | # openssl rand -hex 32
12 | secret = "b72376b88e6f249cb0921052ea8a092381ca17fd8bb0caf4d847e337b3d34cf8"
13 | https_only = false
14 |
15 | [logging]
16 | level = "DEBUG"
17 | file = "/var/log/quetz.log"
18 |
19 | [users]
20 | admins = [
21 | "dummy:alice",
22 | "dummy:bob",
23 | "dummy:carol",
24 | "dummy:dave",
25 | ]
26 |
27 |
--------------------------------------------------------------------------------
/tests/test-archspec/virtual-packages.yaml:
--------------------------------------------------------------------------------
1 | subdirs:
2 | linux-64:
3 | packages:
4 | __archspec: "1 x86_64_v2"
5 |
--------------------------------------------------------------------------------
/tests/test-channel-inversion/environment.yaml:
--------------------------------------------------------------------------------
1 | channels:
2 | # This example is constructed in this way to mirror a real life packaging
3 | # issue that was experienced in 2022-07.
4 | # In this case we have the channel order as recommended by rapids ai for
5 | # installing cudf, but we want to force getting cuda-python from conda-forge
6 | # instead of from the nvidia channel which would normally have higher priority
7 | - conda-forge
8 | - defaults
9 | dependencies:
10 | - zlib
11 | - defaults::libgomp
12 |
--------------------------------------------------------------------------------
/tests/test-cuda/environment.yaml:
--------------------------------------------------------------------------------
1 | name: cuda
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - cudatoolkit >=11,<12
6 | - cudnn >=8,<9
--------------------------------------------------------------------------------
/tests/test-cuda/virtual-packages-old-glibc.yaml:
--------------------------------------------------------------------------------
1 | subdirs:
2 | linux-64:
3 | packages:
4 | __glibc: "2.11"
--------------------------------------------------------------------------------
/tests/test-cuda/virtual-packages.yaml:
--------------------------------------------------------------------------------
1 | subdirs:
2 | linux-64:
3 | packages:
4 | __glibc: "2.17"
5 |
--------------------------------------------------------------------------------
/tests/test-dependency-removal/environment-postupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - zlib
--------------------------------------------------------------------------------
/tests/test-dependency-removal/environment-preupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - zlib
7 | - xz
--------------------------------------------------------------------------------
/tests/test-env-filter-platform/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - python <3.11
5 | - clang_osx-arm64 # [arm64]
6 | - clang_osx-64 # [osx64]
7 | - gcc_linux-64>=6 # [linux64]
8 | platforms:
9 | - osx-arm64
10 | - osx-64
11 | - linux-64
12 |
--------------------------------------------------------------------------------
/tests/test-env-nodefaults/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - nodefaults
3 | - conda-forge
4 | dependencies:
5 | - python <3.11
--------------------------------------------------------------------------------
/tests/test-environment-blas-mkl/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - numpy
5 | - blas[build=mkl]
--------------------------------------------------------------------------------
/tests/test-explicit-toposorted/environment.yml:
--------------------------------------------------------------------------------
1 | # Run conda-lock on this to pre-generate the alphabetized lockfile
2 | # on which we will test toposort. While we include a pip section here for
3 | # good measure, we won't actually test it since pip does its own toposort.
4 | channels:
5 | - conda-forge
6 | platforms:
7 | - linux-64
8 | dependencies:
9 | - gdal
10 | - pip:
11 | - pydantic
12 |
--------------------------------------------------------------------------------
/tests/test-flit-default-pip/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.flit.metadata]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 | requires = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | "tomlkit >=0.7",
10 | ]
11 | requires-python = ">=3.7"
12 |
13 | [tool.flit.metadata.requires-extra]
14 | test = [
15 | "pytest >=5.1.0"
16 | ]
17 |
18 | [build-system]
19 | requires = ["flit_core >=2,<4"]
20 | build-backend = "flit_core.buildapi"
21 |
22 | [tool.conda-lock]
23 | channels = [
24 | 'defaults'
25 | ]
26 | default-non-conda-source = "pip"
27 |
28 | [tool.conda-lock.dependencies]
29 | sqlite = ">=3.34"
30 | certifi = ">=2019.11.28"
31 |
--------------------------------------------------------------------------------
/tests/test-flit-skip-non-conda-lock/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.flit.metadata]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 | requires = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | "tomlkit >=0.7",
10 | ]
11 | requires-python = ">=3.7"
12 |
13 | [tool.flit.metadata.requires-extra]
14 | test = [
15 | "pytest >=5.1.0"
16 | ]
17 |
18 | [build-system]
19 | requires = ["flit_core >=2,<4"]
20 | build-backend = "flit_core.buildapi"
21 |
22 | [tool.conda-lock]
23 | channels = [
24 | 'defaults'
25 | ]
26 | skip-non-conda-lock = true
27 |
28 | [tool.conda-lock.dependencies]
29 | python = ">=3.7"
30 | sqlite = ">=3.34"
31 | certifi = ">=2019.11.28"
32 |
--------------------------------------------------------------------------------
/tests/test-flit/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.flit.metadata]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 | requires = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | ]
10 | requires-python = ">=3.7"
11 |
12 | [tool.flit.metadata.requires-extra]
13 | test = [
14 | "pytest >=5.1.0"
15 | ]
16 |
17 | [build-system]
18 | requires = ["flit_core >=2,<4"]
19 | build-backend = "flit_core.buildapi"
20 |
21 | [tool.conda-lock]
22 | channels = [
23 | 'defaults'
24 | ]
25 |
26 | [tool.conda-lock.dependencies]
27 | sqlite = ">=3.34"
28 | certifi = ">=2019.11.28"
29 | toml = {source = "pypi"}
--------------------------------------------------------------------------------
/tests/test-get-pkgs-dirs/mamba-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "base environment": "/home/runner/miniconda3/envs/esmvaltool-fromlock",
3 | "channels": [
4 | "https://conda.anaconda.org/conda-forge/linux-64",
5 | "https://conda.anaconda.org/conda-forge/noarch"
6 | ],
7 | "curl version": "libcurl/8.9.1 OpenSSL/3.3.2 zlib/1.3.1 zstd/1.5.6 libssh2/1.11.0 nghttp2/1.58.0",
8 | "env location": "/home/runner/miniconda3/envs/esmvaltool-fromlock",
9 | "environment": "base (active)",
10 | "envs directories": [
11 | "/home/runner/miniconda3/envs/esmvaltool-fromlock/envs"
12 | ],
13 | "libarchive version": "libarchive 3.7.4 zlib/1.2.13 liblzma/5.2.6 bz2lib/1.0.8 liblz4/1.9.3 libzstd/1.5.6",
14 | "libmamba version": "2.0.2",
15 | "mamba version": "2.0.2",
16 | "package cache": [
17 | "/home/runner/conda_pkgs_dir"
18 | ],
19 | "platform": "linux-64",
20 | "populated config files": [
21 | "/home/runner/.condarc"
22 | ],
23 | "user config files": [
24 | "/home/runner/.mambarc"
25 | ],
26 | "virtual packages": [
27 | "__unix=0=0",
28 | "__linux=6.5.0=0",
29 | "__glibc=2.35=0",
30 | "__archspec=1=x86_64_v3"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/tests/test-get-pkgs-dirs/micromamba-1.4.5-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "base environment": "/home/user/micromamba",
3 | "channels": [
4 | "https://conda.anaconda.org/conda-forge/linux-64",
5 | "https://conda.anaconda.org/conda-forge/noarch",
6 | "https://conda.anaconda.org/nodefaults/linux-64",
7 | "https://conda.anaconda.org/nodefaults/noarch"
8 | ],
9 | "curl version": "libcurl/7.88.1 OpenSSL/3.1.1 zlib/1.2.13 zstd/1.5.2 libssh2/1.11.0 nghttp2/1.52.0",
10 | "env location": "/home/user/micromamba/envs/esmvaltool-lock-test",
11 | "environment": "esmvaltool-lock-test (active)",
12 | "libarchive version": "libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2",
13 | "libmamba version": "1.4.5",
14 | "micromamba version": "1.4.5",
15 | "platform": "linux-64",
16 | "populated config files": [
17 | "/home/user/.condarc"
18 | ],
19 | "user config files": [
20 | "/home/user/.mambarc"
21 | ],
22 | "virtual packages": [
23 | "__unix=0=0",
24 | "__linux=5.15.0=0",
25 | "__glibc=2.31=0",
26 | "__archspec=1=x86_64"
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/tests/test-get-pkgs-dirs/micromamba-1.4.6-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "base environment": "/home/user/micromamba",
3 | "channels": [
4 | "https://conda.anaconda.org/conda-forge/linux-64",
5 | "https://conda.anaconda.org/conda-forge/noarch",
6 | "https://conda.anaconda.org/nodefaults/linux-64",
7 | "https://conda.anaconda.org/nodefaults/noarch"
8 | ],
9 | "curl version": "libcurl/7.88.1 OpenSSL/3.1.1 zlib/1.2.13 zstd/1.5.2 libssh2/1.11.0 nghttp2/1.52.0",
10 | "env location": "/home/user/micromamba/envs/esmvaltool-lock-test",
11 | "environment": "esmvaltool-lock-test (active)",
12 | "envs directories": [
13 | "/home/user/micromamba/envs"
14 | ],
15 | "libarchive version": "libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2",
16 | "libmamba version": "1.4.6",
17 | "micromamba version": "1.4.6",
18 | "package cache": [
19 | "/home/user/micromamba/pkgs",
20 | "/home/user/.mamba/pkgs"
21 | ],
22 | "platform": "linux-64",
23 | "populated config files": [
24 | "/home/user/.condarc"
25 | ],
26 | "user config files": [
27 | "/home/user/.mambarc"
28 | ],
29 | "virtual packages": [
30 | "__unix=0=0",
31 | "__linux=5.15.0=0",
32 | "__glibc=2.31=0",
33 | "__archspec=1=x86_64"
34 | ]
35 | }
--------------------------------------------------------------------------------
/tests/test-get-pkgs-dirs/micromamba-config-list-pkgs_dirs.json:
--------------------------------------------------------------------------------
1 | {
2 | "pkgs_dirs": [
3 | "/home/user/micromamba/pkgs",
4 | "/home/user/.mamba/pkgs"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/tests/test-git-package/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - git
5 | platforms:
6 | - osx-64
7 |
--------------------------------------------------------------------------------
/tests/test-git-tag/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - python
5 | - requests
6 | - pip:
7 | - git+https://github.com/pydantic/pydantic@v2.0b2
--------------------------------------------------------------------------------
/tests/test-git/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - python
5 | - requests
6 | - pip:
7 | - git+https://github.com/pydantic/pydantic
--------------------------------------------------------------------------------
/tests/test-input-hash-zlib/.gitignore:
--------------------------------------------------------------------------------
1 | *.lock
2 |
--------------------------------------------------------------------------------
/tests/test-input-hash-zlib/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | - defaults
4 | dependencies:
5 | - zlib
6 |
--------------------------------------------------------------------------------
/tests/test-install-with-pip-deps/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - idna
5 | - pip:
6 | - requests
7 | platforms:
8 | - linux-64
9 | - linux-aarch64
10 |
--------------------------------------------------------------------------------
/tests/test-local-pip/environment.yml:
--------------------------------------------------------------------------------
1 | name: gen2-analysis
2 | channels:
3 | - conda-forge
4 | platforms:
5 | - linux-64
6 | dependencies:
7 | - python >=3.8,<3.10
8 | - pip:
9 | - -e .
10 |
--------------------------------------------------------------------------------
/tests/test-local-pip/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from setuptools import setup
4 |
5 |
6 | setup(
7 | name="test-package",
8 | version="0.1",
9 | packages=["testy"],
10 | install_requires=["requests"],
11 | )
12 |
--------------------------------------------------------------------------------
/tests/test-local-pip/testy.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/conda/conda-lock/ee628bd0152944ca3c38b0ac9ae29162dddc434a/tests/test-local-pip/testy.py
--------------------------------------------------------------------------------
/tests/test-lockfile-with-auth/test.lock:
--------------------------------------------------------------------------------
1 | # The following domains require authentication:
2 | # - a.mychannel.cloud
3 | # - c.mychannel.cloud
4 | # - d.mychannel.cloud
5 | http://username_a:password_a@a.mychannel.cloud/mypackage
6 | http://b.mychannel.cloud/mypackage
7 | http://username_c:password_c@c.mychannel.cloud/mypackage
8 | # pip mypackage @ http://username_d:password_d@d.mychannel.cloud/mypackage
9 |
--------------------------------------------------------------------------------
/tests/test-lockfile/no-auth.lock:
--------------------------------------------------------------------------------
1 | http://a.mychannel.cloud/mypackage
2 | http://b.mychannel.cloud/mypackage
3 | http://c.mychannel.cloud/mypackage
4 | # pip mypackage @ http://d.mychannel.cloud/mypackage
5 |
--------------------------------------------------------------------------------
/tests/test-lockfile/test.lock:
--------------------------------------------------------------------------------
1 | http://user:password@a.mychannel.cloud/mypackage
2 | http://b.mychannel.cloud/mypackage
3 | http://user:password@c.mychannel.cloud/mypackage
4 | # pip mypackage @ http://user:password@d.mychannel.cloud/mypackage
5 |
--------------------------------------------------------------------------------
/tests/test-lookup/emoji-to-python-dateutil-lookup.yml:
--------------------------------------------------------------------------------
1 | # Trick conda-lock into thinking that the emoji Conda package provides
2 | # python-dateutil as a pip dependency
3 |
4 | python-dateutil:
5 | conda_name: emoji
6 | import_name: emoji
7 | mapping_source: conda-lock-test-suite
8 | pypi_name: python-dateutil
9 |
--------------------------------------------------------------------------------
/tests/test-lookup/empty-lookup.yml:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/tests/test-lookup/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | - nodefaults
4 | platforms:
5 | - linux-64
6 | dependencies:
7 | # The emoji package has no dependencies.
8 | - emoji==2.8.0
9 | - pip
10 | - pip:
11 | # Arrow's dependencies are python-dateutil >=2.7.0 and types-python-dateutil >=2.8.10.
12 | # Note that a version 2.8.0 exists of python-dateutil. This makes it possible
13 | # to add an entry to the lookup table that maps emoji to python-dateutil.
14 | - arrow==1.3.0
15 |
--------------------------------------------------------------------------------
/tests/test-message/conda.txt:
--------------------------------------------------------------------------------
1 | HTTP 401 UNAUTHORIZED for url
2 | Elapsed: 00:00.144955
3 |
4 | An HTTP error occurred when trying to retrieve this URL.
5 | HTTP errors are often intermittent, and a simple retry will get you on your way.
6 |
--------------------------------------------------------------------------------
/tests/test-message/mamba.txt:
--------------------------------------------------------------------------------
1 | HTTP 401 UNAUTHORIZED for url
2 | Elapsed: 00:00.092086
3 |
4 | An HTTP error occurred when trying to retrieve this URL.
5 | HTTP errors are often intermittent, and a simple retry will get you on your way.
6 |
--------------------------------------------------------------------------------
/tests/test-move-pip-dependency/environment-postupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - six
--------------------------------------------------------------------------------
/tests/test-move-pip-dependency/environment-preupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - pip:
7 | - six
--------------------------------------------------------------------------------
/tests/test-multi-sources/dev.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | - pytest
3 |
--------------------------------------------------------------------------------
/tests/test-multi-sources/main.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | - python <3.11
3 | platforms:
4 | - osx-arm64
5 | - osx-64
6 | - linux-64
7 |
--------------------------------------------------------------------------------
/tests/test-multi-sources/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | pandas = "^1.5.0"
9 |
10 | [build-system]
11 | requires = ["poetry>=0.12"]
12 | build-backend = "poetry.masonry.api"
13 |
14 | [tool.conda-lock]
15 | platforms = [
16 | "win-64",
17 | "osx-arm64"
18 | ]
19 |
--------------------------------------------------------------------------------
/tests/test-multiple-categories/dev.yml:
--------------------------------------------------------------------------------
1 | category: dev
2 | channels:
3 | - conda-forge
4 | platforms:
5 | - linux-64
6 |
7 | dependencies:
8 | - pandas =2.0
9 | - astropy =5.0
10 |
--------------------------------------------------------------------------------
/tests/test-multiple-categories/main.yml:
--------------------------------------------------------------------------------
1 | category: main
2 | channels:
3 | - conda-forge
4 | platforms:
5 | - linux-64
6 |
7 | dependencies:
8 | - python =3.10
9 |
--------------------------------------------------------------------------------
/tests/test-multiple-categories/test.yml:
--------------------------------------------------------------------------------
1 | category: test
2 | channels:
3 | - conda-forge
4 | platforms:
5 | - linux-64
6 |
7 | dependencies:
8 | - pyspark =3.4
9 |
--------------------------------------------------------------------------------
/tests/test-os-name-marker/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - pip
5 | - pip:
6 | - jupyter-server ==2.3.0
7 | platforms:
8 | - linux-64
9 |
--------------------------------------------------------------------------------
/tests/test-pdm-default-pip/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "conda-lock-test-pdm"
3 | authors = [{ name = "conda-lock", email = "conda-lock@conda-lock" }]
4 | description = ""
5 | requires-python = ">=3.7"
6 | dependencies = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | "tomlkit >=0.7",
10 | ]
11 |
12 | [project.optional-dependencies]
13 | cli = ["click >=7.0"]
14 |
15 | [tool.pdm.dev-dependencies]
16 | test = [
17 | "pytest >=5.1.0",
18 | ]
19 |
20 | [tool.conda-lock]
21 | channels = [
22 | "defaults",
23 | ]
24 | default-non-conda-source = "pip"
25 |
26 | [tool.conda-lock.dependencies]
27 | certifi = ">=2019.11.28"
28 | sqlite = ">=3.34"
29 |
--------------------------------------------------------------------------------
/tests/test-pdm-skip-non-conda-lock/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "conda-lock-test-pdm"
3 | authors = [{ name = "conda-lock", email = "conda-lock@conda-lock" }]
4 | description = ""
5 | requires-python = ">=3.7"
6 | dependencies = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | "tomlkit >=0.7",
10 | ]
11 |
12 | [project.optional-dependencies]
13 | cli = ["click >=7.0"]
14 |
15 | [tool.pdm.dev-dependencies]
16 | test = [
17 | "pytest >=5.1.0",
18 | ]
19 |
20 | [tool.conda-lock]
21 | channels = [
22 | "defaults",
23 | ]
24 | skip-non-conda-lock = true
25 |
26 | [tool.conda-lock.dependencies]
27 | python = ">=3.7"
28 | certifi = ">=2019.11.28"
29 | sqlite = ">=3.34"
30 |
--------------------------------------------------------------------------------
/tests/test-pdm/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "conda-lock-test-pdm"
3 | authors = [{ name = "conda-lock", email = "conda-lock@conda-lock" }]
4 | description = ""
5 | requires-python = ">=3.7"
6 | dependencies = [
7 | "requests >=2.13.0",
8 | "toml >=0.10",
9 | ]
10 |
11 | [project.optional-dependencies]
12 | cli = ["click >=7.0"]
13 |
14 | [tool.pdm.dev-dependencies]
15 | test = [
16 | "pytest >=5.1.0",
17 | ]
18 |
19 | [tool.conda-lock]
20 | channels = [
21 | "defaults",
22 | ]
23 |
24 | [tool.conda-lock.dependencies]
25 | certifi = ">=2019.11.28"
26 | sqlite = ">=3.34"
27 |
--------------------------------------------------------------------------------
/tests/test-pip-conda-name-confusion/environment.yaml:
--------------------------------------------------------------------------------
1 | # This example aims to test for issues in https://github.com/conda/conda-lock/issues/253
2 | # The core issue is when multiple conda packages map to the same pip package name. Here,
3 | # conda has dask and dask-core that both map to the pypi package dask. This would cause
4 | # confusion when finalizing the resolved environment
5 | channels:
6 | - conda-forge
7 | dependencies:
8 | - pip
9 | - dask
10 | - pip:
11 | - dask
12 |
--------------------------------------------------------------------------------
/tests/test-pip-finds-recent-manylinux-wheels/environment.yml:
--------------------------------------------------------------------------------
1 | # environment.yml
2 | channels:
3 | - conda-forge
4 |
5 | dependencies:
6 | - pip
7 | - pip:
8 | - lightgbm
9 |
--------------------------------------------------------------------------------
/tests/test-pip-full-url/environment.yml:
--------------------------------------------------------------------------------
1 | # environment.yml
2 | channels:
3 | - conda-forge
4 |
5 | dependencies:
6 | - pip
7 | - pip:
8 | - requests @ https://github.com/psf/requests/releases/download/v2.31.0/requests-2.31.0-py3-none-any.whl
9 | - typing-extensions @ https://files.pythonhosted.org/packages/24/21/7d397a4b7934ff4028987914ac1044d3b7d52712f30e2ac7a2ae5bc86dd0/typing_extensions-4.8.0-py3-none-any.whl#sha256=8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0
10 |
--------------------------------------------------------------------------------
/tests/test-pip-hash-checking/environment.yml:
--------------------------------------------------------------------------------
1 | # environment.yml
2 | channels:
3 | - conda-forge
4 |
5 | dependencies:
6 | - pip
7 | - pip:
8 | - flit-core === 3.9.0 --hash=sha256:1234
9 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/.gitignore:
--------------------------------------------------------------------------------
1 | *.tar.gz
2 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/environment.yaml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | pip-repositories:
4 | - http://$PIP_USER:$PIP_PASSWORD@private-pypi.org/api/pypi/simple
5 | - http://$PIP_USER:$PIP_PASSWORD@private-pypi-custom-port.org:8080/api/pypi/simple
6 | dependencies:
7 | - python=3.11
8 | - requests=2.26
9 | - pip:
10 | - fake-private-package==1.0.0
11 | - fake-private-package-custom-port==1.0.0
12 | platforms:
13 | - linux-64
14 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-1.0.0/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.1
2 | Name: fake-private-package
3 | Version: 1.0.0
4 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-1.0.0/setup.cfg:
--------------------------------------------------------------------------------
1 | [egg_info]
2 | tag_build =
3 | tag_date = 0
4 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-1.0.0/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 |
4 | setup(
5 | name="fake-private-package",
6 | version="1.0.0",
7 | )
8 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-custom-port-1.0.0/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.1
2 | Name: fake-private-package-custom-port
3 | Version: 1.0.0
4 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-custom-port-1.0.0/setup.cfg:
--------------------------------------------------------------------------------
1 | [egg_info]
2 | tag_build =
3 | tag_date = 0
4 |
--------------------------------------------------------------------------------
/tests/test-pip-repositories/fake-private-package-custom-port-1.0.0/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 |
4 | setup(
5 | name="fake-private-package-custom-port",
6 | version="1.0.0",
7 | )
8 |
--------------------------------------------------------------------------------
/tests/test-pip-respects-glibc-version/environment.yml:
--------------------------------------------------------------------------------
1 | # environment.yml
2 | channels:
3 | - conda-forge
4 |
5 | dependencies:
6 | - pip
7 | - pip:
8 | - cryptography
9 |
--------------------------------------------------------------------------------
/tests/test-pip-respects-glibc-version/virtual-packages.yml:
--------------------------------------------------------------------------------
1 | subdirs:
2 | linux-64:
3 | packages:
4 | __glibc: "2.17"
--------------------------------------------------------------------------------
/tests/test-pip-with-platform-selector/environment.yml:
--------------------------------------------------------------------------------
1 | name: test-pip-with-platform-selector
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - tomli
6 | - pip:
7 | - psutil # [linux64]
8 | platforms:
9 | - linux-64
10 | - osx-arm64
11 |
--------------------------------------------------------------------------------
/tests/test-platforms/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.conda-lock]
2 | channels = [
3 | 'defaults'
4 | ]
5 | platforms = ['none', 'such']
6 |
--------------------------------------------------------------------------------
/tests/test-poetry-default-pip/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | channels = [
25 | 'defaults'
26 | ]
27 | default-non-conda-source = "pip"
28 |
29 | [tool.conda-lock.dependencies]
30 | sqlite = ">=3.34"
31 | certifi = ">=2019.11.28"
32 |
--------------------------------------------------------------------------------
/tests/test-poetry-git-subdir/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 | tensorflow = { git = "git+https://github.com/tensorflow/tensorflow@v2.17.0", subdirectory = "tensorflow/tools/pip_package" }
16 |
17 | [build-system]
18 | requires = ["poetry>=0.12"]
19 | build-backend = "poetry.masonry.api"
--------------------------------------------------------------------------------
/tests/test-poetry-git/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 | pydantic = { git = "git+https://github.com/pydantic/pydantic@v2.0b2" }
16 |
17 | [build-system]
18 | requires = ["poetry>=0.12"]
19 | build-backend = "poetry.masonry.api"
--------------------------------------------------------------------------------
/tests/test-poetry-ibis/fetch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # fetch the latest version of the ibis pyproject.toml
4 | curl -s https://raw.githubusercontent.com/ibis-project/ibis/master/pyproject.toml > pyproject.toml
5 |
--------------------------------------------------------------------------------
/tests/test-poetry-no-pypi/other_project1/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | channels = [
25 | 'defaults'
26 | ]
27 |
28 | [tool.conda-lock.dependencies]
29 | sqlite = ">=3.34"
30 | certifi = ">=2019.11.28"
31 |
--------------------------------------------------------------------------------
/tests/test-poetry-no-pypi/other_project2/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | allow-pypi-requests = true
25 | channels = [
26 | 'defaults'
27 | ]
28 |
29 | [tool.conda-lock.dependencies]
30 | sqlite = ">=3.34"
31 | certifi = ">=2019.11.28"
32 |
--------------------------------------------------------------------------------
/tests/test-poetry-no-pypi/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | allow-pypi-requests = false
25 | channels = [
26 | 'defaults'
27 | ]
28 |
29 | [tool.conda-lock.dependencies]
30 | sqlite = ">=3.34"
31 | certifi = ">=2019.11.28"
32 |
--------------------------------------------------------------------------------
/tests/test-poetry-optional/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry-optional"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | toml = ""
10 | # Checking `optional = true` but not in extra
11 | tomlkit = { version = "", optional = true }
12 | # Checking extra but `optional = true` not specified
13 | requests = "^2.13.0"
14 |
15 | [tool.poetry.dev-dependencies]
16 | # Checking `optional = true` but not in dependencies
17 | pytest = { version = "~5.1.0", optional = true }
18 | # Checking extra but not in dependencies
19 | pyyaml = ""
20 |
21 | [tool.poetry.extras]
22 | rest = ["requests"]
23 | yaml = ["pyyaml"]
24 |
25 | [build-system]
26 | requires = ["poetry>=0.12"]
27 | build-backend = "poetry.masonry.api"
28 |
29 | [tool.conda-lock]
30 | platforms = ["osx-arm64"]
31 | channels = ["conda-forge"]
32 |
--------------------------------------------------------------------------------
/tests/test-poetry-path/.gitignore:
--------------------------------------------------------------------------------
1 | *.tar.gz
2 |
--------------------------------------------------------------------------------
/tests/test-poetry-path/fake-private-package-1.0.0/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.1
2 | Name: fake-private-package
3 | Version: 1.0.0
4 |
--------------------------------------------------------------------------------
/tests/test-poetry-path/fake-private-package-1.0.0/setup.cfg:
--------------------------------------------------------------------------------
1 | [egg_info]
2 | tag_build =
3 | tag_date = 0
4 |
--------------------------------------------------------------------------------
/tests/test-poetry-path/fake-private-package-1.0.0/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup
2 |
3 |
4 | setup(
5 | name="fake-private-package",
6 | version="1.0.0",
7 | )
8 |
--------------------------------------------------------------------------------
/tests/test-poetry-path/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.10"
9 | pytest = "~5.1.0"
10 | fake-private-package = { path = "./fake-private-package-1.0.0" }
11 |
12 | [build-system]
13 | requires = ["poetry>=0.12"]
14 | build-backend = "poetry.masonry.api"
--------------------------------------------------------------------------------
/tests/test-poetry-skip-non-conda-lock/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | channels = [
25 | 'defaults'
26 | ]
27 | skip-non-conda-lock = true
28 |
29 | [tool.conda-lock.dependencies]
30 | python = "3.11"
31 | sqlite = "*"
32 | certifi = "*"
33 |
--------------------------------------------------------------------------------
/tests/test-poetry/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [tool.poetry.dependencies]
8 | python = "^3.7"
9 | requests = "^2.13.0"
10 | toml = ">=0.10"
11 | tomlkit = { version = ">=0.7.0,<1.0.0", optional = true }
12 |
13 | [tool.poetry.dev-dependencies]
14 | pytest = "~5.1.0"
15 |
16 | [tool.poetry.extras]
17 | tomlkit = ["tomlkit"]
18 |
19 | [build-system]
20 | requires = ["poetry>=0.12"]
21 | build-backend = "poetry.masonry.api"
22 |
23 | [tool.conda-lock]
24 | channels = [
25 | 'defaults'
26 | ]
27 |
28 | [tool.conda-lock.dependencies]
29 | sqlite = ">=3.34"
30 | certifi = ">=2019.11.28"
31 |
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-gh155/environment.yml:
--------------------------------------------------------------------------------
1 | # /tmp/environment.yml
2 | channels:
3 | - conda-forge
4 | platform:
5 | - linux-64
6 | dependencies:
7 | - python=3.9
8 | - pip
9 | - pip:
10 | - matplotlib
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-gh290/pyproject/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["poetry-core>=1.0.0"]
3 | build-backend = "poetry.core.masonry.api"
4 |
5 | [tool.poetry]
6 | name = "tester"
7 | version = "0.1.0"
8 | description = "tester project"
9 | requires-python = ">=3.9"
10 |
11 | # Conda lock environment specs
12 | [tool.conda-lock]
13 | channels = [
14 | "bioconda",
15 | "conda-forge"
16 | ]
17 | platforms = [
18 | "linux-64",
19 | "osx-64"
20 | ]
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-gh290/tzdata/environment.yaml:
--------------------------------------------------------------------------------
1 | name: python
2 | platforms:
3 | - linux-64
4 | - osx-64
5 | channels:
6 | - bioconda
7 | - conda-forge
8 | dependencies:
9 | - python=3.9.12
10 | - pybedtools
11 | - pip
12 | - pip:
13 | - pandas==1.3.5
14 |
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-gh290/wdl/environment.yaml:
--------------------------------------------------------------------------------
1 | name: python
2 | platforms:
3 | - linux-64
4 | - osx-64
5 | channels:
6 | - bioconda
7 | - conda-forge
8 | dependencies:
9 | - python=3.9.12
10 | - pip
11 | - miniwdl=1.2.3
12 | - pip:
13 | - pytest-wdl
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-gh449/environment.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | - python=3.10
3 | - pip
4 | - pip:
5 | - pydantic[email,dotenv]==1.10.10
6 | channels:
7 | - defaults
8 |
--------------------------------------------------------------------------------
/tests/test-pypi-resolve-namediff/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - python=3.9
5 | - dask-core
6 | - pip
7 | - pip:
8 | - geogif # brings in dask and chokes with dask(-/_)core name in conda-forge
9 |
--------------------------------------------------------------------------------
/tests/test-pypi-resolve/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | dependencies:
4 | - python=3.9
5 | - requests=2.26
6 | - pip:
7 | - requests-toolbelt==0.9.1
--------------------------------------------------------------------------------
/tests/test-recipe/meta.yaml:
--------------------------------------------------------------------------------
1 | {% set version = "1.0.5" %}
2 |
3 | package:
4 | name: foo
5 | version: {{ version }}
6 |
7 | build:
8 | number: 0
9 | script:
10 | - export PYTHONUNBUFFERED=1 # [ppc64le]
11 | - {{ PYTHON }} -m pip install --no-deps --ignore-installed .
12 | skip: True # [py2k]
13 |
14 | requirements:
15 | build:
16 | - {{ compiler('c') }}
17 | - {{ compiler('cxx') }}
18 | host:
19 | - python
20 | - pip
21 | - cython >=0.28.2
22 | - numpy
23 | run:
24 | - python
25 | - {{ pin_compatible('numpy') }}
26 | - python-dateutil >=2.6.1
27 | - pytz >=2017.2
28 | - enum34 # [py27]
29 | - zlib # [unix]
30 |
31 | test:
32 | requires:
33 | - pytest
34 |
--------------------------------------------------------------------------------
/tests/test-source-paths/sources/environment.yaml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - python ==3.9.6
7 | - pydantic ==1.7
8 | - flask <2
9 |
--------------------------------------------------------------------------------
/tests/test-stdout/conda.txt:
--------------------------------------------------------------------------------
1 | {"fetch":"qc_drg_grouper_binar | ","finished":true,"maxval":1,"progress":1}
2 | {"fetch":"qc_drg_grouper_binar | ","finished":true,"maxval":1,"progress":1}
3 | {
4 | "error": "Multiple Errors Encountered.",
5 | "errors": [
6 | {
7 | "caused_by": "HTTPError('401 Client Error: Unauthorized for url: https://conda.org/channel/package.tar.bz2')",
8 | "elapsed_time": "00:00.144955",
9 | "error": "CondaHTTPError: HTTP 401 UNAUTHORIZED for url \nElapsed: 00:00.144955\n\nAn HTTP error occurred when trying to retrieve this URL.\nHTTP errors are often intermittent, and a simple retry will get you on your way.\n",
10 | "exception_name": "CondaHTTPError",
11 | "exception_type": "",
12 | "message": "HTTP 401 UNAUTHORIZED for url \nElapsed: 00:00.144955\n\nAn HTTP error occurred when trying to retrieve this URL.\nHTTP errors are often intermittent, and a simple retry will get you on your way.\n",
13 | "reason": "UNAUTHORIZED",
14 | "response_details": "",
15 | "status_code": 401,
16 | "url": "https://conda.org/channel/package.tar.bz2"
17 | }
18 | ],
19 | "exception_name": "CondaMultiError",
20 | "exception_type": ""
21 | }
22 |
--------------------------------------------------------------------------------
/tests/test-stdout/mamba.txt:
--------------------------------------------------------------------------------
1 | {
2 | "error": "Multiple Errors Encountered.",
3 | "errors": [
4 | {
5 | "caused_by": "HTTPError('401 Client Error: Unauthorized for url: https://conda.org/channel/package.tar.bz2')",
6 | "elapsed_time": "00:00.092086",
7 | "error": "CondaHTTPError: HTTP 401 UNAUTHORIZED for url \nElapsed: 00:00.092086\n\nAn HTTP error occurred when trying to retrieve this URL.\nHTTP errors are often intermittent, and a simple retry will get you on your way.\n",
8 | "exception_name": "CondaHTTPError",
9 | "exception_type": "",
10 | "message": "HTTP 401 UNAUTHORIZED for url \nElapsed: 00:00.092086\n\nAn HTTP error occurred when trying to retrieve this URL.\nHTTP errors are often intermittent, and a simple retry will get you on your way.\n",
11 | "reason": "UNAUTHORIZED",
12 | "response_details": "",
13 | "status_code": 401,
14 | "url": "https://conda.org/channel/package.tar.bz2"
15 | }
16 | ],
17 | "exception_name": "CondaMultiError",
18 | "exception_type": ""
19 | }
20 |
--------------------------------------------------------------------------------
/tests/test-stripped-lockfile/no-auth.lock:
--------------------------------------------------------------------------------
1 | http://a.mychannel.cloud/mypackage
2 | http://b.mychannel.cloud/mypackage
3 | http://c.mychannel.cloud/mypackage
4 | # pip mypackage @ http://d.mychannel.cloud/mypackage
5 |
--------------------------------------------------------------------------------
/tests/test-stripped-lockfile/test.lock:
--------------------------------------------------------------------------------
1 | # The following domains require authentication:
2 | # - a.mychannel.cloud
3 | # - c.mychannel.cloud
4 | # - d.mychannel.cloud
5 | http://a.mychannel.cloud/mypackage
6 | http://b.mychannel.cloud/mypackage
7 | http://c.mychannel.cloud/mypackage
8 | # pip mypackage @ http://d.mychannel.cloud/mypackage
9 |
--------------------------------------------------------------------------------
/tests/test-toml-channel/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "conda-lock-test-poetry-optional"
3 | version = "0.0.1"
4 | description = ""
5 | authors = ["conda-lock"]
6 |
7 | [build-system]
8 | requires = ["poetry>=0.12"]
9 | build-backend = "poetry.masonry.api"
10 |
11 | [tool.conda-lock]
12 | platforms = ["linux-64"]
13 | channels = ["conda-forge"]
14 |
15 | [tool.conda-lock.dependencies]
16 | "comet_ml::comet_ml" = "3.32.0"
17 |
--------------------------------------------------------------------------------
/tests/test-update-filter-platform/environment-postupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | - osx-64
6 | dependencies:
7 | - zlib ==1.2.13
8 |
--------------------------------------------------------------------------------
/tests/test-update-filter-platform/environment-preupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | - osx-64
6 | dependencies:
7 | - zlib ==1.2.8
8 |
--------------------------------------------------------------------------------
/tests/test-update/environment-postupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - python
7 | - pydantic >=1.9.0,<1.9.1
8 | - flask >2
9 |
--------------------------------------------------------------------------------
/tests/test-update/environment-preupdate.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | platforms:
4 | - linux-64
5 | dependencies:
6 | - python ==3.9.6
7 | - pydantic ==1.7
8 | - flask <2
--------------------------------------------------------------------------------
/tests/test-uppercase-pip/environment.yml:
--------------------------------------------------------------------------------
1 | name: myenv
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - pip
6 | - pip:
7 | - MIDIFile
--------------------------------------------------------------------------------
/tests/zlib/conda-linux-64.lock:
--------------------------------------------------------------------------------
1 | # Generated by conda-lock.
2 | # platform: linux-64
3 | # input_hash: 1173e3c96ce20d063a5701b325b76deb97394f891af270af4ee0cb7cc1f6e838
4 | @EXPLICIT
5 | https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
6 | https://conda.anaconda.org/conda-forge/linux-64/libgomp-11.2.0-h1d223b6_12.tar.bz2#763c5ec8116d984b4a33342236d7da36
7 | https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-1_gnu.tar.bz2#561e277319a41d4f24f5c05a9ef63c04
8 | https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-11.2.0-h1d223b6_12.tar.bz2#d34efbb8d7d6312c816b4bb647b818b1
9 | https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.11-h36c2ea0_1013.tar.bz2#dcddf696ff5dfcab567100d691678e18
10 | https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.11-h36c2ea0_1013.tar.bz2#cf7190238072a41e9579e4476a6a60b8
11 |
--------------------------------------------------------------------------------
/tests/zlib/conda-osx-64.lock:
--------------------------------------------------------------------------------
1 | # Generated by conda-lock.
2 | # platform: osx-64
3 | # input_hash: d01c1f5433f30bdbcd3bdad8d9b096774ab55f1210c094acdc61a35b32b28d67
4 | @EXPLICIT
5 | https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.11-h9173be1_1013.tar.bz2#a3a6a53beaa92c5cfe52ee3a198e78cc
6 | https://conda.anaconda.org/conda-forge/osx-64/zlib-1.2.11-h9173be1_1013.tar.bz2#cf985617d679990418c380099620b01a
7 |
--------------------------------------------------------------------------------
/tests/zlib/conda-win-64.lock:
--------------------------------------------------------------------------------
1 | # Generated by conda-lock.
2 | # platform: win-64
3 | # input_hash: 310b23581083bfb983927c40d3bdc86162192d7b26ffd7bffc385f627c155697
4 | @EXPLICIT
5 | https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.20348.0-h57928b3_0.tar.bz2#6d666b6ea8251231ff508062d1e41f9c
6 | https://conda.anaconda.org/conda-forge/win-64/vs2008_runtime-9.0.30729.6161-0.tar.bz2#9531fa584348748d666b66055c771182
7 | https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.29.30037-h902a5da_6.tar.bz2#33d07ebe91062743eabc9e53a60d18e1
8 | https://conda.anaconda.org/conda-forge/win-64/vc-14.2-hb210afc_6.tar.bz2#c2aecbc9b00ba6f352e27d3d61fd31fb
9 | https://conda.anaconda.org/conda-forge/win-64/libzlib-1.2.11-h8ffe710_1013.tar.bz2#b28dd2488b4e5f892c67071acc1d0a8c
10 | https://conda.anaconda.org/conda-forge/win-64/zlib-1.2.11-h8ffe710_1013.tar.bz2#866517df4fd8bb813bc20c24cf7b8f05
11 |
--------------------------------------------------------------------------------
/tests/zlib/environment.yml:
--------------------------------------------------------------------------------
1 | channels:
2 | - conda-forge
3 | - defaults
4 | dependencies:
5 | - zlib
6 |
--------------------------------------------------------------------------------