mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
This adds a home in our opensource repo for python libraries and binaries, under a top-level "python" directory. Future CLs will relocate ICANN reporting bits and pieces to new homes under this directory, and will use the MOE configuration and python_directory_import rule defined here. This approach is roughly modeled on the protobuf Bazel opensource project, which also uses a top-level directory for various languages, and also uses the "imports" parameter to exclude that directory in python module names: https://github.com/google/protobuf/blob/v3.0.0-beta-3/BUILD#L568 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127459882
27 lines
1 KiB
Text
27 lines
1 KiB
Text
# Top-level directory for python code in the domain registry project.
|
|
#
|
|
# Code within this directory should live under python/google/registry.
|
|
#
|
|
# For an example of another Google open-source Bazel-based project using a
|
|
# top-level python directory in a similar way, see
|
|
# https://github.com/google/protobuf/tree/master/python
|
|
|
|
package(default_visibility = ["//java/google/registry:registry_project"])
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
|
|
# NOTE: All py_library() rules under this directory should depend on this rule.
|
|
#
|
|
# This rule serves to add this directory (/python) to the PYTHONPATH of any
|
|
# python executable rules that transitively depend on this rule. Adding this
|
|
# directory ensures that imports for "google.registry.*" can be correctly
|
|
# resolved to files that are under //python/google/registry.
|
|
#
|
|
# See also:
|
|
# - http://www.bazel.io/docs/be/python.html#py_library.imports
|
|
# - https://github.com/google/protobuf/blob/v3.0.0-beta-3/BUILD#L568
|
|
py_library(
|
|
name = "python_directory_import",
|
|
imports = ["."],
|
|
)
|