diff --git a/examples/pip_repository_annotations/WORKSPACE b/examples/pip_repository_annotations/WORKSPACE index 95d978bda..8234e572c 100644 --- a/examples/pip_repository_annotations/WORKSPACE +++ b/examples/pip_repository_annotations/WORKSPACE @@ -34,7 +34,6 @@ write_file( copy_executables = {"@pip_repository_annotations_example//:data/copy_executable.py": "copied_content/executable.py"}, copy_files = {"@pip_repository_annotations_example//:data/copy_file.txt": "copied_content/file.txt"}, data = [":generated_file"], - data_exclude_glob = ["*.dist-info/RECORD"], ), } diff --git a/examples/pip_repository_annotations/pip_repository_annotations_test.py b/examples/pip_repository_annotations/pip_repository_annotations_test.py index f90401506..0e2e8b3c4 100644 --- a/examples/pip_repository_annotations/pip_repository_annotations_test.py +++ b/examples/pip_repository_annotations/pip_repository_annotations_test.py @@ -64,33 +64,6 @@ def test_copy_executables(self): stdout = proc.stdout.decode("utf-8").strip() self.assertEqual(stdout, "Hello world from copied executable") - def test_data_exclude_glob(self): - current_wheel_version = "0.37.1" - - r = runfiles.Create() - dist_info_dir = ( - "pip_repository_annotations_example/external/{}/wheel-{}.dist-info".format( - self.wheel_pkg_dir(), - current_wheel_version, - ) - ) - - # `WHEEL` is expected to be there to show dist-info files are included in the runfiles - wheel_path = r.Rlocation("{}/WHEEL".format(dist_info_dir)) - - # However, `RECORD` was explicitly excluded, so it should be missing - record_path = r.Rlocation("{}/RECORD".format(dist_info_dir)) - - # Because windows does not have `--enable_runfiles` on by default, the - # `runfiles.Rlocation` results will be different on this platform vs - # unix platforms. See `@rules_python//python/runfiles` for more details. - if platform.system() == "Windows": - self.assertIsNotNone(wheel_path) - self.assertIsNone(record_path) - else: - self.assertTrue(Path(wheel_path).exists()) - self.assertFalse(Path(record_path).exists()) - if __name__ == "__main__": unittest.main() diff --git a/python/pip_install/extract_wheels/lib/bazel.py b/python/pip_install/extract_wheels/lib/bazel.py index e967b3991..ae10dd97d 100644 --- a/python/pip_install/extract_wheels/lib/bazel.py +++ b/python/pip_install/extract_wheels/lib/bazel.py @@ -145,6 +145,7 @@ def generate_build_file_contents( "*.whl", "**/__pycache__/**", "**/* *", + "**/*.dist-info/**", "**/*.py", "**/*.pyc", "BUILD.bazel",