diff --git a/distro/BUILD b/distro/BUILD index b07d12a0..0ffa34a6 100644 --- a/distro/BUILD +++ b/distro/BUILD @@ -84,6 +84,7 @@ py_test( "packaging_test.py", ":release_version.py", ], + imports = [".."], data = [ "testdata/BUILD.tpl", ":distro", diff --git a/pkg/BUILD b/pkg/BUILD index 62c3cc7e..1c33b2f8 100644 --- a/pkg/BUILD +++ b/pkg/BUILD @@ -68,6 +68,7 @@ starlark_library( py_binary( name = "make_rpm", srcs = ["make_rpm.py"], + imports = [".."], python_version = "PY3", srcs_version = "PY3", target_compatible_with = select({ @@ -84,6 +85,7 @@ py_binary( py_library( name = "make_rpm_lib", srcs = ["make_rpm.py"], + imports = [".."], srcs_version = "PY3", visibility = [ "//experimental:__subpackages__", diff --git a/pkg/private/BUILD b/pkg/private/BUILD index 85096bcb..8f3ca4c6 100644 --- a/pkg/private/BUILD +++ b/pkg/private/BUILD @@ -65,6 +65,7 @@ py_library( srcs = [ "build_info.py", ], + imports = ["../.."], srcs_version = "PY3", visibility = [ "//:__subpackages__", @@ -78,6 +79,7 @@ py_library( "__init__.py", "archive.py", ], + imports = ["../.."], srcs_version = "PY3", visibility = [ "//:__subpackages__", @@ -91,6 +93,7 @@ py_library( "__init__.py", "helpers.py", ], + imports = ["../.."], srcs_version = "PY3", visibility = [ "//:__subpackages__", @@ -101,6 +104,7 @@ py_library( py_library( name = "manifest", srcs = ["manifest.py"], + imports = ["../.."], srcs_version = "PY3", visibility = ["//visibility:public"], ) diff --git a/pkg/private/deb/BUILD b/pkg/private/deb/BUILD index c38da64b..646877b1 100644 --- a/pkg/private/deb/BUILD +++ b/pkg/private/deb/BUILD @@ -48,6 +48,7 @@ exports_files( py_binary( name = "make_deb", srcs = ["make_deb.py"], + imports = ["../../.."], python_version = "PY3", visibility = ["//visibility:public"], deps = [ @@ -58,6 +59,7 @@ py_binary( py_library( name = "make_deb_lib", srcs = ["make_deb.py"], + imports = ["../../.."], srcs_version = "PY3", visibility = ["//tests/deb:__pkg__"], deps = [ diff --git a/pkg/private/tar/BUILD b/pkg/private/tar/BUILD index fb9ab50a..6bfeb1e0 100644 --- a/pkg/private/tar/BUILD +++ b/pkg/private/tar/BUILD @@ -45,6 +45,7 @@ exports_files( py_binary( name = "build_tar", srcs = ["build_tar.py"], + imports = ["../../.."], python_version = "PY3", srcs_version = "PY3", visibility = ["//visibility:public"], @@ -62,6 +63,7 @@ py_library( srcs = [ "tar_writer.py", ], + imports = ["../../.."], srcs_version = "PY3", visibility = [ "//tests:__subpackages__", diff --git a/pkg/private/zip/BUILD b/pkg/private/zip/BUILD index 2e778585..4823e90c 100644 --- a/pkg/private/zip/BUILD +++ b/pkg/private/zip/BUILD @@ -48,6 +48,7 @@ exports_files( py_binary( name = "build_zip", srcs = ["build_zip.py"], + imports = ["../../.."], python_version = "PY3", srcs_version = "PY3", visibility = ["//visibility:public"], diff --git a/pkg/releasing/BUILD b/pkg/releasing/BUILD index 2a38667a..31d3f611 100644 --- a/pkg/releasing/BUILD +++ b/pkg/releasing/BUILD @@ -36,6 +36,7 @@ py_library( "__init__.py", "release_tools.py", ], + imports = ["../.."], srcs_version = "PY3", ) @@ -44,6 +45,7 @@ py_binary( srcs = [ "print_rel_notes.py", ], + imports = ["../.."], python_version = "PY3", deps = [ ":release_utils", diff --git a/tests/BUILD b/tests/BUILD index 7fa40a56..07b993a5 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -74,6 +74,7 @@ py_test( srcs = [ "archive_test.py", ], + imports = [".."], data = [ "//tests:testdata/empty.ar", "//tests:testdata/a_ab.ar", @@ -124,6 +125,7 @@ cc_binary( py_test( name = "helpers_test", srcs = ["helpers_test.py"], + imports = [".."], python_version = "PY3", srcs_version = "PY3", deps = [ diff --git a/tests/deb/BUILD b/tests/deb/BUILD index 2ab60e08..655b46bf 100644 --- a/tests/deb/BUILD +++ b/tests/deb/BUILD @@ -96,6 +96,7 @@ py_test( srcs = [ "pkg_deb_test.py", ], + imports = ["../.."], data = [ # The target includes both the .deb and .changes files in DefaultInfo ":test_deb", @@ -119,6 +120,7 @@ py_test( srcs = [ "control_field_test.py", ], + imports = ["../.."], python_version = "PY3", deps = [ "//pkg/private/deb:make_deb_lib", diff --git a/tests/install/BUILD b/tests/install/BUILD index f083b3f7..df97dfff 100644 --- a/tests/install/BUILD +++ b/tests/install/BUILD @@ -23,6 +23,7 @@ py_test( name = "install_test", srcs = ["test.py"], args = ["-v"], + imports = ["../.."], data = [ ":test_installer", ], diff --git a/tests/mappings/BUILD b/tests/mappings/BUILD index 404b25ef..eb97f9f5 100644 --- a/tests/mappings/BUILD +++ b/tests/mappings/BUILD @@ -35,6 +35,7 @@ package(default_applicable_licenses = ["//:license"]) py_library( name = "manifest_test_lib", srcs = ["manifest_test_lib.py"], + imports = ["../.."], srcs_version = "PY3", deps = [ "@bazel_tools//tools/python/runfiles", diff --git a/tests/rpm/BUILD b/tests/rpm/BUILD index 5f91da8d..849dfc40 100644 --- a/tests/rpm/BUILD +++ b/tests/rpm/BUILD @@ -373,6 +373,7 @@ diff_test( py_library( name = "rpm_util", srcs = ["rpm_util.py"], + imports = ["../.."], visibility = [":__subpackages__"], ) diff --git a/tests/tar/BUILD b/tests/tar/BUILD index c9800578..ab06e2ec 100644 --- a/tests/tar/BUILD +++ b/tests/tar/BUILD @@ -34,6 +34,7 @@ py_test( srcs = [ "tar_writer_test.py", ], + imports = ["../.."], data = [ ":compressor", ":test_tar_compression", @@ -339,6 +340,7 @@ py_test( srcs = [ "pkg_tar_test.py", ], + imports = ["../.."], data = [ ":test-tar-empty_dirs.tar", ":test-tar-empty_files.tar", diff --git a/tests/zip/BUILD b/tests/zip/BUILD index 4b4898d6..52b17f0a 100644 --- a/tests/zip/BUILD +++ b/tests/zip/BUILD @@ -29,6 +29,7 @@ py_library( srcs = [ "zip_test_lib.py", ], + imports = ["../.."], srcs_version = "PY3", deps = [ "@bazel_tools//tools/python/runfiles",