From ac581d5817149b80c303d507598e11ae36d0d4de Mon Sep 17 00:00:00 2001 From: Hadrien Mary Date: Wed, 6 Nov 2024 11:00:32 -0500 Subject: [PATCH] infra: improve macOS local build experience --- .gitignore | 8 ++++++++ .scripts/run_docker_build.sh | 2 +- build-locally.py | 4 ++++ setup.cfg | 2 -- 4 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 84e75110340fd..a10539f431fce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,13 @@ # macOS folder metadata .DS_Store +# macOS specific files +MacOSX*.sdk.tar.xz +SDKs/ + # User builds build_artifacts +miniforge3/ # Compiled Python code __pycache__ @@ -21,3 +26,6 @@ __pycache__ .pixi pixi.toml pixi.lock + +# rattler-build outputs files +output/ diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 57a568798e1c9..08a935f03ba03 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -44,7 +44,7 @@ mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done" rm -f "$DONE_CANARY" -DOCKER_RUN_ARGS="-it" +DOCKER_RUN_ARGS="-it ${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ "${AZURE}" == "True" ]; then DOCKER_RUN_ARGS="" diff --git a/build-locally.py b/build-locally.py index 8b7434893256b..d1c0cdea235ab 100644 --- a/build-locally.py +++ b/build-locally.py @@ -27,6 +27,10 @@ def setup_environment(ns): os.path.dirname(__file__), "SDKs" ) + # The default cache location might not be writable using docker on macOS. + if ns.config.startswith("linux") and platform.system() == "Darwin": + os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = "-e XDG_CACHE_HOME=/tmp/rattler_cache" + def run_docker_build(ns): script = ".scripts/run_docker_build.sh" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e14b7619292fb..0000000000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=88