We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This works for me:
# ... deps = [ "@poetry_lock_repo//deps:pytest", ], )
But this does not:
load("@poetry_lock_repo//:requirements.bzl", "requirement") # ... deps = [ requirement("pytest"), ], )
If I do the following:
print(requirement("pytest"))
I get:
@rules_pycross~~lock_file~poetry_lock_repo//deps:pytest
This doesn't match "@poetry_lock_repo//deps:pytest".
"@poetry_lock_repo//deps:pytest"
Is there a bug in the requirement helper function?
requirement
requirements.bzl
load("@@//tools/bazel/poetry:poetry_lock.bzl", "PINS", "repositories") def requirement(pkg): # Convert given name into normalized package name. # https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization pkg = pkg.replace("_", "-").replace(".", "-").lower() for i in range(len(pkg)): if "--" in pkg: pkg = pkg.replace("--", "-") else: break return "@rules_pycross~~lock_file~poetry_lock_repo//deps:%s" % pkg all_requirements = ["@rules_pycross~~lock_file~poetry_lock_repo//deps:%s" % v for v in PINS.values()] install_deps = repositories
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This works for me:
But this does not:
If I do the following:
I get:
This doesn't match
"@poetry_lock_repo//deps:pytest"
.Is there a bug in the
requirement
helper function?requirements.bzl
The text was updated successfully, but these errors were encountered: