From 5d093e114271ad9240eff7693d26fcc29d10a79e Mon Sep 17 00:00:00 2001 From: Gesa Stupperich Date: Tue, 12 Oct 2021 07:58:42 +0100 Subject: [PATCH] Mac bazelrc build tip (#1418) * Copy build tip from Linux to Mac instructions * Update build tip * Accept BSD 3 clause license --- CONTRIBUTORS | 1 + docs/mac.md | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d65037ccb..4014ce283 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -86,6 +86,7 @@ Thore Tyborski Alexander Giorev Ren Tatsumoto lolilolicon +Gesa Stupperich ******************** diff --git a/docs/mac.md b/docs/mac.md index d116ab0da..16febc02c 100644 --- a/docs/mac.md +++ b/docs/mac.md @@ -38,6 +38,17 @@ $ ln -sf /usr/local/bin/{python3.9,python} This linking will not work if you're using the system Python from Big Sur, which is one of the reasons why we recommend using Python from python.org. +But even so, if you still have a Python 2 binary on your system linked to +/usr/bin/python, it can happen that Bazel uses it and the build process +errors. In that case you might want to try forcing Bazel to use the +Python 3 binary by putting the following into a file called user.bazelrc at +the top of this repo (assuming /usr/local/bin/python links to your Python +3.9 binary). + +``` +build --action_env=PYO3_PYTHON=/usr/local/bin/python +``` + ## Running Anki during development From the top level of Anki's source folder: