I've set up a bzlmod pdm instance of this. I think I have everything right, but I am getting this error when referencing a package:
bazel_dep(name = "rules_pycross", version = "0.5.3")
environments = use_extension("@rules_pycross//pycross/extensions:environments.bzl", "environments")
use_repo(environments, "pycross_environments")
lock_import = use_extension("@rules_pycross//pycross/extensions:lock_import.bzl", "lock_import")
# Import from PDM
lock_import.import_pdm(
lock_file = "//:pdm.lock",
project_file = "//:pyproject.toml",
repo = "pdm_deps",
)
# The actual repos are loaded from the lock_repos extension.
lock_repos = use_extension("@rules_pycross//pycross/extensions:lock_repos.bzl", "lock_repos")
use_repo(lock_repos, "pdm_deps")
lock_file = use_extension("@rules_pycross//pycross/extensions:lock_file.bzl", "lock_file")
lock_file.instantiate(
name = "pdm_lock_file",
lock_file = "//:pdm_lock.bzl",
)
use_repo(lock_file, "pdm_lock_file")
deps = [
"@pdm_deps//:confluent-kafka",
],
# This file is @generated by PDM.
# It is not intended for manual editing.
[metadata]
groups = ["default"]
strategy = ["cross_platform", "inherit_metadata", "static_urls"]
lock_version = "4.4.1"
content_hash = "sha256:bcb962c07982d058ea4ce7560880f6355e6eefc29cbe7ab572f415341365f9b4"
[[package]]
name = "confluent-kafka"
version = "2.3.0"
summary = "Confluent's Python client for Apache Kafka"
groups = ["default"]
files = [
{url = "https://files.pythonhosted.org/packages/25/7d/d8ef2b94cf076a1f5427de51389d710550290e62b385abdd983cc57b3691/confluent_kafka-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d55fbdcd75586dd17fe3fe64f4b4efa1c93ce9dd09c275de46f75772826e8860"},
{url = "https://files.pythonhosted.org/packages/3a/5b/a6daa455fdaa39c966f5efb0bcdef761308926b5c4fecde3b812a0cb628e/confluent_kafka-2.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:7f9f4099aaf2c5daae828d2f356e4277d0ef0485ec883dbe395f0c0e054450d0"},
{url = "https://files.pythonhosted.org/packages/57/77/b43fbc947b3ef9e26a85e742af488bf05cf19c5934525f8a552c492afa5c/confluent_kafka-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ec17b26d6155feeaded4a435ba949095aea9699afb65309d8f22e55722f53c48"},
{url = "https://files.pythonhosted.org/packages/7b/7a/67ee8dedaa6941841a2425bc140a401ad21ad4fb011280771865db7d460e/confluent_kafka-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9b42bf1b75fdd9aa20c77b27f166f6289440ac649f70622a0117a8e7aa6169d"},
{url = "https://files.pythonhosted.org/packages/82/f5/2dd545316e143f1707f8f9abfbb770bcd2a0046a32922ca146852dd5e266/confluent-kafka-2.3.0.tar.gz", hash = "sha256:4069e7b56e0baf9db18c053a605213f0ab2d8f23715dca7b3bd97108df446ced"},
{url = "https://files.pythonhosted.org/packages/fc/6c/f064ee299604127ca83fdb31bd31c8864ea420fca012405837500f6d4420/confluent_kafka-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:1c6b29d57df99dabd45e67fd0aa46f17f195b057734ad84cf9cfdc2542855c10"},
]
# This file is generated by rules_pycross.
# It is not intended for manual editing.
"""Pycross-generated dependency targets."""
load("@@rules_pycross~0.5.3//pycross:defs.bzl", "pycross_wheel_build", "pycross_wheel_library")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
PINS = {
"confluent-kafka": "[email protected]",
}
# buildifier: disable=unnamed-macro
def targets():
"""Generated package targets."""
for pin_name, pin_target in PINS.items():
native.alias(
name = pin_name,
actual = ":" + pin_target,
)
native.alias(
name = "_env_python_3.11.6_aarch64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_aarch64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.11.6_aarch64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_aarch64-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11.6_ppc64le-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_ppc64le-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11.6_s390x-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_s390x-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11.6_x86_64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.11.6_x86_64-pc-windows-msvc",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-pc-windows-msvc_config",
)
native.alias(
name = "_env_python_3.11.6_x86_64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11_aarch64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_aarch64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.11_aarch64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_aarch64-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11_ppc64le-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_ppc64le-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11_s390x-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_s390x-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.11_x86_64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.11_x86_64-pc-windows-msvc",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-pc-windows-msvc_config",
)
native.alias(
name = "_env_python_3.11_x86_64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.12_aarch64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_aarch64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.12_aarch64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_aarch64-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.12_ppc64le-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_ppc64le-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.12_s390x-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_s390x-unknown-linux-gnu_config",
)
native.alias(
name = "_env_python_3.12_x86_64-apple-darwin",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-apple-darwin_config",
)
native.alias(
name = "_env_python_3.12_x86_64-pc-windows-msvc",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-pc-windows-msvc_config",
)
native.alias(
name = "_env_python_3.12_x86_64-unknown-linux-gnu",
actual = "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-unknown-linux-gnu_config",
)
# buildifier: disable=unused-variable
_target = select({
":_env_python_3.11.6_aarch64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_aarch64-apple-darwin.json",
":_env_python_3.11.6_aarch64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_aarch64-unknown-linux-gnu.json",
":_env_python_3.11.6_ppc64le-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_ppc64le-unknown-linux-gnu.json",
":_env_python_3.11.6_s390x-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_s390x-unknown-linux-gnu.json",
":_env_python_3.11.6_x86_64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-apple-darwin.json",
":_env_python_3.11.6_x86_64-pc-windows-msvc": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-pc-windows-msvc.json",
":_env_python_3.11.6_x86_64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11.6_x86_64-unknown-linux-gnu.json",
":_env_python_3.11_aarch64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_aarch64-apple-darwin.json",
":_env_python_3.11_aarch64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_aarch64-unknown-linux-gnu.json",
":_env_python_3.11_ppc64le-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_ppc64le-unknown-linux-gnu.json",
":_env_python_3.11_s390x-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_s390x-unknown-linux-gnu.json",
":_env_python_3.11_x86_64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-apple-darwin.json",
":_env_python_3.11_x86_64-pc-windows-msvc": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-pc-windows-msvc.json",
":_env_python_3.11_x86_64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.11_x86_64-unknown-linux-gnu.json",
":_env_python_3.12_aarch64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_aarch64-apple-darwin.json",
":_env_python_3.12_aarch64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_aarch64-unknown-linux-gnu.json",
":_env_python_3.12_ppc64le-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_ppc64le-unknown-linux-gnu.json",
":_env_python_3.12_s390x-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_s390x-unknown-linux-gnu.json",
":_env_python_3.12_x86_64-apple-darwin": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-apple-darwin.json",
":_env_python_3.12_x86_64-pc-windows-msvc": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-pc-windows-msvc.json",
":_env_python_3.12_x86_64-unknown-linux-gnu": "@@rules_pycross~0.5.3~environments~pycross_environments//:python_3.12_x86_64-unknown-linux-gnu.json",
})
native.alias(
name = "[email protected]",
actual = "@pdm_lock_sdist_confluent_kafka_2.3.0//file",
)
pycross_wheel_build(
name = "[email protected]",
sdist = ":[email protected]",
target_environment = _target,
tags = ["manual"],
)
native.alias(
name = "[email protected]",
actual = select({
":_env_python_3.11.6_aarch64-apple-darwin": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_11_0_arm64//file",
":_env_python_3.11.6_aarch64-unknown-linux-gnu": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_28_aarch64//file",
":_env_python_3.11.6_ppc64le-unknown-linux-gnu": ":[email protected]",
":_env_python_3.11.6_s390x-unknown-linux-gnu": ":[email protected]",
":_env_python_3.11.6_x86_64-apple-darwin": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_10_9_x86_64//file",
":_env_python_3.11.6_x86_64-pc-windows-msvc": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_win_amd64//file",
":_env_python_3.11.6_x86_64-unknown-linux-gnu": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_17_x86_64.manylinux2014_x86_64//file",
":_env_python_3.11_aarch64-apple-darwin": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_11_0_arm64//file",
":_env_python_3.11_aarch64-unknown-linux-gnu": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_28_aarch64//file",
":_env_python_3.11_ppc64le-unknown-linux-gnu": ":[email protected]",
":_env_python_3.11_s390x-unknown-linux-gnu": ":[email protected]",
":_env_python_3.11_x86_64-apple-darwin": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_10_9_x86_64//file",
":_env_python_3.11_x86_64-pc-windows-msvc": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_win_amd64//file",
":_env_python_3.11_x86_64-unknown-linux-gnu": "@pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_17_x86_64.manylinux2014_x86_64//file",
":_env_python_3.12_aarch64-apple-darwin": ":[email protected]",
":_env_python_3.12_aarch64-unknown-linux-gnu": ":[email protected]",
":_env_python_3.12_ppc64le-unknown-linux-gnu": ":[email protected]",
":_env_python_3.12_s390x-unknown-linux-gnu": ":[email protected]",
":_env_python_3.12_x86_64-apple-darwin": ":[email protected]",
":_env_python_3.12_x86_64-pc-windows-msvc": ":[email protected]",
":_env_python_3.12_x86_64-unknown-linux-gnu": ":[email protected]",
}),
)
pycross_wheel_library(
name = "[email protected]",
wheel = ":[email protected]",
)
# buildifier: disable=unnamed-macro
def repositories():
"""Generated package repositories."""
maybe(
http_file,
name = "pdm_lock_sdist_confluent_kafka_2.3.0",
urls = [
"https://files.pythonhosted.org/packages/82/f5/2dd545316e143f1707f8f9abfbb770bcd2a0046a32922ca146852dd5e266/confluent-kafka-2.3.0.tar.gz",
],
sha256 = "4069e7b56e0baf9db18c053a605213f0ab2d8f23715dca7b3bd97108df446ced",
downloaded_file_path = "confluent-kafka-2.3.0.tar.gz",
)
maybe(
http_file,
name = "pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_10_9_x86_64",
urls = [
"https://files.pythonhosted.org/packages/25/7d/d8ef2b94cf076a1f5427de51389d710550290e62b385abdd983cc57b3691/confluent_kafka-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl",
],
sha256 = "d55fbdcd75586dd17fe3fe64f4b4efa1c93ce9dd09c275de46f75772826e8860",
downloaded_file_path = "confluent_kafka-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl",
)
maybe(
http_file,
name = "pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_macosx_11_0_arm64",
urls = [
"https://files.pythonhosted.org/packages/57/77/b43fbc947b3ef9e26a85e742af488bf05cf19c5934525f8a552c492afa5c/confluent_kafka-2.3.0-cp311-cp311-macosx_11_0_arm64.whl",
],
sha256 = "ec17b26d6155feeaded4a435ba949095aea9699afb65309d8f22e55722f53c48",
downloaded_file_path = "confluent_kafka-2.3.0-cp311-cp311-macosx_11_0_arm64.whl",
)
maybe(
http_file,
name = "pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_17_x86_64.manylinux2014_x86_64",
urls = [
"https://files.pythonhosted.org/packages/7b/7a/67ee8dedaa6941841a2425bc140a401ad21ad4fb011280771865db7d460e/confluent_kafka-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
],
sha256 = "e9b42bf1b75fdd9aa20c77b27f166f6289440ac649f70622a0117a8e7aa6169d",
downloaded_file_path = "confluent_kafka-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
)
maybe(
http_file,
name = "pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_manylinux_2_28_aarch64",
urls = [
"https://files.pythonhosted.org/packages/3a/5b/a6daa455fdaa39c966f5efb0bcdef761308926b5c4fecde3b812a0cb628e/confluent_kafka-2.3.0-cp311-cp311-manylinux_2_28_aarch64.whl",
],
sha256 = "7f9f4099aaf2c5daae828d2f356e4277d0ef0485ec883dbe395f0c0e054450d0",
downloaded_file_path = "confluent_kafka-2.3.0-cp311-cp311-manylinux_2_28_aarch64.whl",
)
maybe(
http_file,
name = "pdm_lock_wheel_confluent_kafka_2.3.0_cp311_cp311_win_amd64",
urls = [
"https://files.pythonhosted.org/packages/fc/6c/f064ee299604127ca83fdb31bd31c8864ea420fca012405837500f6d4420/confluent_kafka-2.3.0-cp311-cp311-win_amd64.whl",
],
sha256 = "1c6b29d57df99dabd45e67fd0aa46f17f195b057734ad84cf9cfdc2542855c10",
downloaded_file_path = "confluent_kafka-2.3.0-cp311-cp311-win_amd64.whl",
)