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
Trying to use virtual_deps works with py_binary but not with py_test.
virtual_deps
py_binary
py_test
It complains that the type of resolutions is wrong.
resolutions
Development (host) and target OS/architectures: Linux
Output of bazel --version:
bazel --version
bazel 6.2.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
WORKSPACE
MODULE.bazel
http_archive( name = "aspect_rules_py", sha256 = "2ce48e0f3eaaf73204b623f99f23d45690b862a994b5b3c2464a2e361b0fc4ae", strip_prefix = "rules_py-1.0.0", url = "https://github.com/aspect-build/rules_py/releases/download/v1.0.0/rules_py-v1.0.0.tar.gz", )
Language(s) and/or frameworks involved: Python
Create a py_test that uses resolutions like so:
# ... resolutions = resolutions.from_requirements(all_whl_requirements_by_package, requirement) py_test( name = "py_test_tests", srcs = glob([ "tests/**/*.py", ]) + [ ":__test__.py" ], main = ":__test__.py", package_collisions = "error", resolutions = resolutions, python_version = "3.9.16", size = "small", )
No response
The text was updated successfully, but these errors were encountered:
As a work-around:
r = resolutions.from_requirements({ "boto3": None, "torch": None, # etc... }, requirement).to_label_keyed_dict() py_test( name = "py_test_tests", srcs = glob([ "tests/**/*.py", ]) + [ ":__test__.py" ], main = ":__test__.py", package_collisions = "error", resolutions = r, python_version = "3.9.16", size = "small", )
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What happened?
Trying to use
virtual_deps
works withpy_binary
but not withpy_test
.It complains that the type of
resolutions
is wrong.Version
Development (host) and target OS/architectures: Linux
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
Python
How to reproduce
Create a py_test that uses resolutions like so:
Any other information?
No response
The text was updated successfully, but these errors were encountered: