The lock_import extension.
lock_import = use_extension("@rules_pycross//pycross/extensions:lock_import.bzl", "lock_import") lock_import.import_pdm(all_development_groups, all_optional_groups, default, default_alias_single_version, default_build_dependencies, development_groups, disallow_builds, local_wheels, lock_file, optional_groups, project_file, repo, require_static_urls, target_environments) lock_import.import_poetry(all_optional_groups, default, default_alias_single_version, default_build_dependencies, disallow_builds, local_wheels, lock_file, optional_groups, project_file, repo, target_environments) lock_import.import_uv(all_development_groups, all_optional_groups, default, default_alias_single_version, default_build_dependencies, development_groups, disallow_builds, local_wheels, lock_file, optional_groups, project_file, repo, require_static_urls, target_environments) lock_import.package(name, always_build, build_dependencies, build_target, ignore_dependencies, install_exclude_globs, repo)
TAG CLASSES
Import a PDM lock file.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
all_development_groups | Install all dev dependencies. | Boolean | optional | False |
all_optional_groups | Install all optional dependencies. | Boolean | optional | False |
default | Whether to install dependencies from the default group. | Boolean | optional | True |
default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | False |
default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | [] |
development_groups | List of development dependency groups to install. | List of strings | optional | [] |
disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | False |
local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | [] |
lock_file | The lock file. | Label | required | |
optional_groups | List of optional dependency groups to install. | List of strings | optional | [] |
project_file | The pyproject.toml file. | Label | required | |
repo | The repository name | String | required | |
require_static_urls | Require that the lock file is created with --static-urls. | Boolean | optional | True |
target_environments | A list of target environment descriptors. | List of labels | optional | ["@pycross_environments//:environments"] |
Import a Poetry lock file.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
all_optional_groups | Install all optional dependencies. | Boolean | optional | False |
default | Whether to install dependencies from the default group. | Boolean | optional | True |
default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | False |
default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | [] |
disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | False |
local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | [] |
lock_file | The poetry.lock file. | Label | required | |
optional_groups | List of optional dependency groups to install. | List of strings | optional | [] |
project_file | The pyproject.toml file. | Label | required | |
repo | The repository name | String | required | |
target_environments | A list of target environment descriptors. | List of labels | optional | ["@pycross_environments//:environments"] |
Import a uv lock file.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
all_development_groups | Install all dev dependencies. | Boolean | optional | False |
all_optional_groups | Install all optional dependencies. | Boolean | optional | False |
default | Whether to install dependencies from the default group. | Boolean | optional | True |
default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | False |
default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | [] |
development_groups | List of development dependency groups to install. | List of strings | optional | [] |
disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | False |
local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | [] |
lock_file | The lock file. | Label | required | |
optional_groups | List of optional dependency groups to install. | List of strings | optional | [] |
project_file | The pyproject.toml file. | Label | required | |
repo | The repository name | String | required | |
require_static_urls | Require that the lock file is created with --static-urls. | Boolean | optional | True |
target_environments | A list of target environment descriptors. | List of labels | optional | ["@pycross_environments//:environments"] |
Specify package-specific settings.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | The package key (name or name@version). | Name | required | |
always_build | If True, don't use pre-built wheels for this package. | Boolean | optional | False |
build_dependencies | A list of additional package keys (name or name@version) to use when building this package from source. | List of strings | optional | [] |
build_target | An optional override build target to use when and if this package needs to be built from source. | Label | optional | None |
ignore_dependencies | A list of package keys (name or name@version) to drop from this package's set of declared dependencies. | List of strings | optional | [] |
install_exclude_globs | A list of globs for files to exclude during installation. | List of strings | optional | [] |
repo | The repository name | String | required |