GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: introduce helper for defining distribution filegroups (#4152) · bookingcom/rules_python@14f436f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • command_line_option
    • BUILD.bazel
  • python
    • BUILD.bazel
    • api
      • BUILD.bazel
    • bin
      • BUILD.bazel
    • cc
      • BUILD.bazel
    • config_settings
      • BUILD.bazel
    • constraints
      • BUILD.bazel
    • entry_points
      • BUILD.bazel
    • extensions
      • BUILD.bazel
    • local_toolchains
      • BUILD.bazel
    • pip_install
      • BUILD.bazel
    • private
      • BUILD.bazel
      • api
        • BUILD.bazel
      • cc
        • BUILD.bazel
      • distribution_filegroup.bzl
      • pypi
        • BUILD.bazel
        • dependency_resolver
          • BUILD.bazel
        • requirements_parser
          • BUILD.bazel
        • whl_installer
          • BUILD.bazel
      • whl_filegroup
        • BUILD.bazel
      • zipapp
        • BUILD.bazel
    • proto
      • BUILD.bazel
    • runfiles
      • BUILD.bazel
    • runtime_env_toolchains
      • BUILD.bazel
    • uv
      • BUILD.bazel
      • private
        • BUILD.bazel
    • zipapp
      • BUILD.bazel
  • tests/distribution_filegroup
    • BUILD.bazel
    • child.txt
    • distribution_filegroup_tests.bzl
    • dummy.ignored
    • f1.txt
    • f2.txt
    • subpkg
      • BUILD.bazel
      • subfile.txt
  • tools
    • BUILD.bazel
    • build_defs
      • BUILD.bazel
      • python
        • BUILD.bazel
        • private
          • BUILD.bazel
    • launcher
      • BUILD.bazel
    • precompiler
      • BUILD.bazel
    • publish
      • BUILD.bazel
    • zipapp
      • BUILD.bazel

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎command_line_option/BUILD.bazel‎

Copy file name to clipboardExpand all lines: command_line_option/BUILD.bazel
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# treated as aliases for `//command_line_option:XXX` psuedo-targets. They
55
# are not actual flags or have any value.
66

7+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup") # buildifier: disable=bzl-visibility
8+
79
package(
810
default_visibility = ["//visibility:public"],
911
)
@@ -23,8 +25,6 @@ alias(
2325
actual = "//python:none",
2426
)
2527

26-
filegroup(
28+
distribution_filegroup(
2729
name = "distribution",
28-
srcs = glob(["**"]),
29-
visibility = ["//:__subpackages__"],
3030
)
Collapse file

‎python/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/BUILD.bazel
+2-18Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,15 @@ that @rules_python//python is only concerned with the core rules.
2929
# gazelle:resolve starlark //python:current_py_toolchain.bzl //python:current_py_toolchain_bzl
3030

3131
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
32+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
3233
load(":current_py_toolchain.bzl", "current_py_toolchain")
3334

3435
package(default_visibility = ["//visibility:public"])
3536

3637
licenses(["notice"])
3738

38-
filegroup(
39+
distribution_filegroup(
3940
name = "distribution",
40-
srcs = glob(["**"]) + [
41-
"//python/api:distribution",
42-
"//python/bin:distribution",
43-
"//python/cc:distribution",
44-
"//python/config_settings:distribution",
45-
"//python/constraints:distribution",
46-
"//python/entry_points:distribution",
47-
"//python/extensions:distribution",
48-
"//python/local_toolchains:distribution",
49-
"//python/pip_install:distribution",
50-
"//python/private:distribution",
51-
"//python/runfiles:distribution",
52-
"//python/runtime_env_toolchains:distribution",
53-
"//python/uv:distribution",
54-
"//python/zipapp:distribution",
55-
],
56-
visibility = ["//:__pkg__"],
5741
)
5842

5943
# ========= bzl_library targets end =========
Collapse file

‎python/api/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/api/BUILD.bazel
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
# limitations under the License.
1414

1515
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
1617

1718
package(
1819
default_visibility = ["//:__subpackages__"],
1920
)
2021

21-
filegroup(
22+
distribution_filegroup(
2223
name = "distribution",
23-
srcs = glob(["**"]),
2424
)
2525

2626
bzl_library(
Collapse file

‎python/bin/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/bin/BUILD.bazel
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
12
load("//python/private:interpreter.bzl", _interpreter_binary = "interpreter_binary")
23
load("//python/private:repl.bzl", "py_repl_binary")
34

4-
filegroup(
5+
package(default_visibility = ["//:__subpackages__"])
6+
7+
distribution_filegroup(
58
name = "distribution",
6-
srcs = glob(["**"]),
7-
visibility = ["//:__subpackages__"],
89
)
910

1011
_interpreter_binary(
Collapse file

‎python/cc/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/cc/BUILD.bazel
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
44
load("//python/private:bzlmod_enabled.bzl", "BZLMOD_ENABLED")
55
load("//python/private:current_py_cc_headers.bzl", "current_py_cc_headers", "current_py_cc_headers_abi3")
66
load("//python/private:current_py_cc_libs.bzl", "current_py_cc_libs")
7+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
78

89
package(
910
default_visibility = ["//:__subpackages__"],
@@ -47,9 +48,8 @@ toolchain_type(
4748
visibility = ["//visibility:public"],
4849
)
4950

50-
filegroup(
51+
distribution_filegroup(
5152
name = "distribution",
52-
srcs = glob(["**"]),
5353
)
5454

5555
bzl_library(
Collapse file

‎python/config_settings/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/config_settings/BUILD.bazel
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
22
load("@pythons_hub//:versions.bzl", "DEFAULT_PYTHON_VERSION", "MINOR_MAPPING", "PYTHON_VERSIONS")
33
load("@rules_python_internal//:rules_python_config.bzl", "config")
4+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
45
load(
56
"//python/private:flags.bzl",
67
"AddSrcsToRunfilesFlag",
@@ -19,15 +20,15 @@ load("//python/private:visibility.bzl", "NOT_ACTUALLY_PUBLIC") # buildifier: di
1920
load("//python/private/pypi:flags.bzl", "define_pypi_internal_flags")
2021
load(":config_settings.bzl", "construct_config_settings")
2122

23+
package(default_visibility = ["//:__subpackages__"])
24+
2225
# We don't generate bzl_library for these because they aren't public targets
2326
# and should be moved
2427
# gazelle:exclude config_settings.bzl
2528
# gazelle:exclude transition.bzl
2629

27-
filegroup(
30+
distribution_filegroup(
2831
name = "distribution",
29-
srcs = glob(["**"]),
30-
visibility = ["//python:__pkg__"],
3132
)
3233

3334
construct_config_settings(
Collapse file

‎python/constraints/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/constraints/BUILD.bazel
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
16+
1517
package(default_visibility = ["//visibility:public"])
1618

1719
licenses(["notice"])
1820

19-
filegroup(
21+
distribution_filegroup(
2022
name = "distribution",
21-
srcs = glob(["**"]),
22-
visibility = ["//python:__pkg__"],
2323
)
2424

2525
# A constraint_setting to use for constraints related to the location of the
Collapse file

‎python/entry_points/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/entry_points/BUILD.bazel
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# limitations under the License.
1414

1515
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
17+
18+
package(default_visibility = ["//:__subpackages__"])
1619

1720
exports_files(
1821
[
@@ -21,10 +24,8 @@ exports_files(
2124
visibility = ["//docs:__subpackages__"],
2225
)
2326

24-
filegroup(
27+
distribution_filegroup(
2528
name = "distribution",
26-
srcs = glob(["**"]),
27-
visibility = ["//python:__subpackages__"],
2829
)
2930

3031
bzl_library(
Collapse file

‎python/extensions/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/extensions/BUILD.bazel
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
# limitations under the License.
1414

1515
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
1617

1718
package(default_visibility = ["//visibility:public"])
1819

1920
licenses(["notice"])
2021

21-
filegroup(
22+
distribution_filegroup(
2223
name = "distribution",
23-
srcs = glob(["**"]),
24-
visibility = ["//python:__pkg__"],
2524
)
2625

2726
bzl_library(
Collapse file

‎python/local_toolchains/BUILD.bazel‎

Copy file name to clipboardExpand all lines: python/local_toolchains/BUILD.bazel
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
load("//python/private:distribution_filegroup.bzl", "distribution_filegroup")
23

34
package(default_visibility = ["//:__subpackages__"])
45

5-
filegroup(
6+
distribution_filegroup(
67
name = "distribution",
7-
srcs = glob(["**"]),
88
)
99

1010
bzl_library(

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.