From a154eb3adc437db3169d53659dc4bf36297a37a4 Mon Sep 17 00:00:00 2001 From: Henry Fuller Date: Tue, 12 Jul 2022 13:27:33 -0700 Subject: [PATCH] safely check for standalone interpreter sentinel files --- python/pip_install/pip_repository.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/pip_install/pip_repository.bzl b/python/pip_install/pip_repository.bzl index 743d3e3787..2c916411ab 100644 --- a/python/pip_install/pip_repository.bzl +++ b/python/pip_install/pip_repository.bzl @@ -73,10 +73,12 @@ def _maybe_set_xcode_location_cflags(rctx, environment): Pip won't be able to compile c extensions from sdists with the pre built python distributions from indygreg otherwise. See https://github.com/indygreg/python-build-standalone/issues/103 """ + python_interpreter_workspace = rctx.path(Label("@{}//:WORKSPACE".format(rctx.attr.python_interpreter_target.workspace_name))).dirname if ( rctx.os.name.lower().startswith("mac os") and rctx.attr.python_interpreter_target != None and - rctx.path(Label("@{}//:{}".format(rctx.attr.python_interpreter_target.workspace_name, STANDALONE_INTERPRETER_FILENAME))) and + # This is a rules_python provided toolchain. + rctx.execute(["ls", "{}/{}".format(python_interpreter_workspace, STANDALONE_INTERPRETER_FILENAME)]).return_code == 0 and not environment.get(CPPFLAGS) ): xcode_sdk_location = rctx.execute(["xcode-select", "--print-path"]) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy