Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.86 KB

conda_package_lock.md

File metadata and controls

47 lines (32 loc) · 2.86 KB

Defines a macro rule to generate a conda lockfile.

A user would define this rule, referring to a requirements.txt file and a target bzl file, to regenerate that file with bazel run. The target file contains an conda_environment which can be loaded and invoked in the repository WORKSPACE file to make the @conda_env target.

conda_package_lock

load("@com_github_10XGenomics_rules_conda//rules:conda_package_lock.bzl", "conda_package_lock")

conda_package_lock(name, requirements, channels, exclude, extra_packages, target, glibc_version,
                   build_file_name, kwargs)

Defines a build target for regenerating the conda package lock.

Consums the requirements.txt file, and produces the package lock file. Requires an existing package lock that includes conda itself.

Once the make_conda_spec tool has been run manually to bootstrap the initial repository, a build target defined with this rule can be used to maintain the package lock, by running bazel run //:generate_package_lock.

PARAMETERS

Name Description Default Value
name The name of the generator target to be invoked with bazel run. "generate_package_lock"
requirements The requirements.txt source file, formatted for conda. "requirements.txt"
channels A list of conda channels in which to look for packages. ["conda-forge"]
exclude Packages to omit from the generated package lock file. []
extra_packages Additional conda_package repository targets to include. []
target The name of the output file, from which the WORKSPACE can load and call the conda_environment method. "conda_package_lock.bzl"
glibc_version The glibc version to tell conda to use when solving dependencies. ""
build_file_name The name of this build file, used for finding the source repository to modify. "BUILD.bazel"
kwargs additional arguments to the rule, e.g. visibility. none