From 74b8ad1eb42ae58816b6c2f6c8416efe30f6f379 Mon Sep 17 00:00:00 2001 From: Tetsuo Kiso Date: Sat, 16 Jul 2022 18:01:59 +0000 Subject: [PATCH 1/2] Exclude static libraries and tests to reduce zipped Python executables --- python/repositories.bzl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/repositories.bzl b/python/repositories.bzl index 1441432547..1e8780250c 100644 --- a/python/repositories.bzl +++ b/python/repositories.bzl @@ -142,6 +142,12 @@ filegroup( ], exclude = [ "**/* *", # Bazel does not support spaces in file names. + # static libraries + "lib/*.a", + "lib/**/*.a", + # tests for the standard libraries. + "lib/**/test/**", + "lib/**/tests/**", ], ), ) From 50de82664db16f9fcad91cd7c8fd4d8df35649fe Mon Sep 17 00:00:00 2001 From: Tetsuo Kiso Date: Mon, 18 Jul 2022 16:17:04 +0900 Subject: [PATCH 2/2] Update python/repositories.bzl Co-authored-by: Jonathon Belotti --- python/repositories.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/repositories.bzl b/python/repositories.bzl index 1e8780250c..7efdadd6ba 100644 --- a/python/repositories.bzl +++ b/python/repositories.bzl @@ -146,8 +146,8 @@ filegroup( "lib/*.a", "lib/**/*.a", # tests for the standard libraries. - "lib/**/test/**", - "lib/**/tests/**", + "lib/python{python_version}/**/test/**", + "lib/python{python_version}/**/tests/**", ], ), )