From e58ed46195428a8c5596f095a79ca50164b96fb8 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Wed, 22 Nov 2023 13:11:53 -0800 Subject: [PATCH 1/2] formula: add `PIP_CACHE_DIR` to build env --- Library/Homebrew/cleanup.rb | 1 + Library/Homebrew/formula.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 605a7e17c9c14..9bf8bfce36368 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -30,6 +30,7 @@ def nested_cache?(pathname) glide_home java_cache npm_cache + pip_cache gclient_cache ].include?(pathname.basename.to_s) end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 1b04c8484d2f4..757ae66c8da2c 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2880,6 +2880,7 @@ def common_stage_test_env GOPATH: "#{HOMEBREW_CACHE}/go_mod_cache", CARGO_HOME: "#{HOMEBREW_CACHE}/cargo_cache", CURL_HOME: ENV.fetch("CURL_HOME") { Dir.home }, + PIP_CACHE_DIR: "#{HOMEBREW_CACHE}/pip_cache", PYTHONDONTWRITEBYTECODE: "1", } end From 1e2cdc6eacffc5754600d2575c2bd53c0de3632d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 23 Nov 2023 12:38:51 +0000 Subject: [PATCH 2/2] formula: tweak cache ordering. --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 757ae66c8da2c..b790aa5910f91 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2879,8 +2879,8 @@ def common_stage_test_env GOCACHE: "#{HOMEBREW_CACHE}/go_cache", GOPATH: "#{HOMEBREW_CACHE}/go_mod_cache", CARGO_HOME: "#{HOMEBREW_CACHE}/cargo_cache", - CURL_HOME: ENV.fetch("CURL_HOME") { Dir.home }, PIP_CACHE_DIR: "#{HOMEBREW_CACHE}/pip_cache", + CURL_HOME: ENV.fetch("CURL_HOME") { Dir.home }, PYTHONDONTWRITEBYTECODE: "1", } end