Skip to content

Commit 7e84add

Browse files
committed
Add a homebrew.py tool. It's not hooked up yet.
1 parent ab24891 commit 7e84add

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

eol_scons/tools/homebrew.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2007-present, NSF NCAR, UCAR
2+
#
3+
# This source code is licensed under the MIT license found in the LICENSE
4+
# file in the root directory of this source tree.
5+
"""
6+
Tool to setup Homebrew for MacOS.
7+
"""
8+
9+
10+
import subprocess
11+
12+
13+
def generate(env):
14+
if env['PLATFORM'] != 'darwin':
15+
return
16+
17+
brewPrefix = subprocess.run(['brew', '--prefix'], capture_output=True, text=True).stdout.strip()
18+
19+
env['BREW_PREFIX'] = brewPrefix
20+
env.PrependENVPath('PATH', brewPrefix + '/bin')
21+
env.AppendUnique(FRAMEWORKPATH=[brewPrefix + '/Frameworks',])
22+
23+
24+
def exists(env):
25+
return True

0 commit comments

Comments
 (0)