From 47613f50bac18d5894a2d3fc054a50287813c99c Mon Sep 17 00:00:00 2001 From: James Fish Date: Fri, 26 Aug 2022 13:12:44 -0400 Subject: [PATCH 1/3] Handle python/Python dir/file in repository archive --- python/repositories.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/repositories.bzl b/python/repositories.bzl index f897904e70..d48e775169 100644 --- a/python/repositories.bzl +++ b/python/repositories.bzl @@ -226,6 +226,11 @@ py_runtime_pair( python_path = python_bin, python_version = python_short_version, ) + # On older macos versions there is a Python directory containing + # object files, which conflicts with a python symlink (macos is case + # insensitive). Therefore remove any file/directory from the archive + # before adding a python symlink. + rctx.delete("python") rctx.symlink(python_bin, "python") rctx.file(STANDALONE_INTERPRETER_FILENAME, "# File intentionally left blank. Indicates that this is an interpreter repo created by rules_python.") rctx.file("BUILD.bazel", build_content) From 95eb764fd73aa78a91dd1243e4413c0c42b32c4e Mon Sep 17 00:00:00 2001 From: James Fish Date: Fri, 26 Aug 2022 13:43:04 -0400 Subject: [PATCH 2/3] Lint --- python/repositories.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/python/repositories.bzl b/python/repositories.bzl index d48e775169..8461b1d60f 100644 --- a/python/repositories.bzl +++ b/python/repositories.bzl @@ -226,6 +226,7 @@ py_runtime_pair( python_path = python_bin, python_version = python_short_version, ) + # On older macos versions there is a Python directory containing # object files, which conflicts with a python symlink (macos is case # insensitive). Therefore remove any file/directory from the archive From 1e0247f16ee6224fc68508d23eb32e09f4dd4d9a Mon Sep 17 00:00:00 2001 From: James Fish Date: Wed, 21 Sep 2022 09:50:20 -0400 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"Disable=20`//python/tests/toolcha?= =?UTF-8?q?ins:python=5F3=5F8=5F10=5Fx86=5F64-apple-darwin=5F=E2=80=A6=20(?= =?UTF-8?q?#830)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a364fcac97b7ccadb5c5a703ec8ce2f2ecef0d97. --- .bazelci/presubmit.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 666654998b..1cc121a4e7 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -12,10 +12,7 @@ all_targets: &all_targets # We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests. skip_use_bazel_version_for_test: true test_targets: - - "--" - "..." - # Disabled due to https://github.com/bazelbuild/rules_python/issues/827 - - "-//python/tests/toolchains:python_3_8_10_x86_64-apple-darwin_test" platforms: ubuntu1804: <<: *all_targets @@ -40,4 +37,4 @@ platforms: # The dependencies needed for this test are not cross-platform: https://github.com/bazelbuild/rules_python/issues/260 - "-//tests:pip_repository_entry_points_example" test_flags: - - "--test_tag_filters=-fix-windows" + - "--test_tag_filters=-fix-windows" \ No newline at end of file