-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD
More file actions
66 lines (62 loc) · 2.5 KB
/
BUILD
File metadata and controls
66 lines (62 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
load("@rules_uv//uv:pip.bzl", "pip_compile")
load("@rules_uv//uv:venv.bzl", "create_venv", "sync_venv")
################################################################################
# BEGIN: UV Setup
#
# These targets enable us to use UV to generate the requirements.txt and venv
# using UV for extra speed beyond what's available out of the box in
# rules_python.
#
# Usage:
# When you want to add a new pypi dep, you'll simple add it to the
# //:requirements.in file, and run `bazel run //:generate_requirements_txt.
# As the name implies this will generate the //:requirements.txt file.
# This file then gets used by the `//:(create|sync)_env` targets to create
# and sync the virtualenv generated at //:.venv to enable IDEs to accurately
# reflect the deps when they get used in python files throughout the repo.
################################################################################
pip_compile(
name = "generate_requirements_txt",
requirements_in = "//:requirements.in", # default
requirements_txt = "//:requirements.txt", # default
)
create_venv(
name = "create_venv",
destination_folder = ".venv",
requirements_txt = "//:requirements.txt", # default
site_packages_extra_files = [
"site_packages_extra/sitecustomize.py",
],
)
sync_venv(
name = "sync_venv",
destination_folder = ".venv",
requirements_txt = "//:requirements.txt", # default
site_packages_extra_files = [
"site_packages_extra/sitecustomize.py",
],
)
################################################################################
# END: UV Setup
################################################################################
################################################################################
# BEGIN: Aliases for Maven Deps
################################################################################
alias(
name = "fernflower",
actual = "@maven//:org_jboss_windup_decompiler_decompiler_fernflower",
visibility = ["//visibility:public"],
)
alias(
name = "fernflower_windup_decompiler_api_forge_addon",
actual = "@maven//:org_jboss_windup_decompiler_decompiler_api_forge_addon",
visibility = ["//visibility:public"],
)
alias(
name = "google-options",
actual = "@maven//:com_github_pcj_google_options",
visibility = ["//visibility:public"],
)
################################################################################
# END: Aliases for Maven Deps
################################################################################