-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
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
Allow setting venv destination in rule #56
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks — just one small change and happy to accept this.
uv/private/venv.bzl
Outdated
@@ -33,6 +34,7 @@ def _venv_impl(ctx): | |||
|
|||
_venv = rule( | |||
attrs = { | |||
"destination_folder": attr.string(mandatory = True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s assign the default value here
uv/private/venv.bzl
Outdated
@@ -42,9 +44,10 @@ _venv = rule( | |||
executable = True, | |||
) | |||
|
|||
def create_venv(name, requirements_txt = None, target_compatible_with = None): | |||
def create_venv(name, requirements_txt = None, target_compatible_with = None, destination_folder = "venv"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…and set default here for the arg to None
Thanks for the contribution and cleanup. This change will be included in a release later this week. |
Previously we could pass the directory as an argument when executing the target.
Now it is also possible to set the default destination directory in code.