This file define the repository rule for fetching conda packages.
load("@com_github_10XGenomics_rules_conda//rules:conda_package_repository.bzl", "conda_package_repository") conda_package_repository(name, archive_type, auth_patterns, base_url, base_urls, cc_include_path, conda_repo, dist_name, exclude, exclude_deps, extra_deps, license_file, licenses, netrc, patch_args, patch_cmds, patch_cmds_win, patch_tool, patches, repo_mapping, sha256)
Fetches a conda package and sets up its BUILD file.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this repository. | Name | required | |
archive_type | The archive type (filename suffix) for the download. | String | optional | "tar.bz2" |
auth_patterns | See http_archive. | Dictionary: String -> String | optional | {} |
base_url | The base URL for fetching this package from conda, e.g. https://conda.anaconda.org/conda-forge/linux-64 |
String | optional | "https://conda.anaconda.org/conda-forge/linux-64" |
base_urls | List of mirror URLs where the requested package can be found, e.g ["http://mirror.example.com/pkgs/conda-forge/linux-64", "https://conda.anaconda.org/conda-forge/linux-64"]`. | List of strings | optional | [] |
cc_include_path | A list of include paths to add for C/C++ targets which depend on this package. If left unspecified, any directory named includes and which contains .h file will be used. |
List of strings | optional | [] |
conda_repo | The name of the merged repository, to use when referring to dependencies. | String | optional | "conda_env" |
dist_name | The fully-qualified (including build ID) name of the package. | String | optional | "" |
exclude | Glob patterns for files to ignore. | List of strings | optional | [] |
exclude_deps | A list of dependencies to exclude from the set declared in metadata. | List of strings | optional | [] |
extra_deps | A list of dependencies to add to the set declared in metadata. | List of strings | optional | [] |
license_file | The tarball-relative path to the license file for this package. If not specified, the path found in the package's about.json file will be used. |
String | optional | "" |
licenses | One or more license_kind targets to use for the package license. If not specified, the appropriate taraget will be guessed from the license field in the package's about.json file. |
List of strings | optional | [] |
netrc | Location of the .netrc file to use for authentication | String | optional | "" |
patch_args | The arguments given to the patch tool. Defaults to -p0, however -p1 will usually be needed for patches generated by git. If multiple -p arguments are specified, the last one will take effect.If arguments other than -p are specified, Bazel will fall back to use patch command line tool instead of the Bazel-native patch implementation. When falling back to patch command line tool and patch_tool attribute is not specified, patch will be used. |
List of strings | optional | ["-p0"] |
patch_cmds | Sequence of Bash commands to be applied on Linux/Macos after patches are applied. | List of strings | optional | [] |
patch_cmds_win | Sequence of Powershell commands to be applied on Windows after patches are applied. If this attribute is not set, patch_cmds will be executed on Windows, which requires Bash binary to exist. | List of strings | optional | [] |
patch_tool | The patch(1) utility to use. If this is specified, Bazel will use the specified patch tool instead of the Bazel-native patch implementation. | String | optional | "" |
patches | A list of files that are to be applied as patches after extracting the archive. By default, it uses the Bazel-native patch implementation which doesn't support fuzz match and binary patch, but Bazel will fall back to use patch command line tool if patch_tool attribute is specified or there are arguments other than -p in patch_args attribute. |
List of labels | optional | [] |
repo_mapping | In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.For example, an entry "@foo": "@bar" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target , it should actually resolve that dependency within globally-declared @bar (@bar//some:target ).This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension's implementation function). |
Dictionary: String -> String | optional | |
sha256 | The sha256 checksum of the tarball to be downloaded. | String | optional | "" |