Skip to content

Commit

Permalink
Merge branch 'master' into cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
gmloose committed Feb 12, 2024
2 parents 81a4039 + 53e35d0 commit dbaebe2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion casacore/measures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def getvalue(self, v):
if not is_measure(v):
raise TypeError('Incorrect input type for getvalue()')
import re
rx = re.compile("m\d+")
rx = re.compile(r"m\d+")
out = []
keys = list(v.keys())
keys.sort()
Expand Down
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Setup script for the CASACORE python wrapper.
"""
import os
import subprocess
import sys
import warnings
from setuptools import setup, Extension, find_packages
Expand Down Expand Up @@ -52,7 +53,17 @@ def find_library_file(libname):

if 'LD_LIBRARY_PATH' in os.environ:
lib_dirs += os.environ['LD_LIBRARY_PATH'].split(':')

# Look for Homebrewed libraries
try:
homebrew_prefix = subprocess.run(
['brew', '--prefix'],
capture_output=True,
check=True,
text=True
).stdout.strip()
lib_dirs.append(join(homebrew_prefix, 'lib'))
except (subprocess.CalledProcessError, FileNotFoundError):
pass
# Append default search path (not a complete list)
lib_dirs += [join(sys.prefix, 'lib'),
'/usr/local/lib',
Expand Down

0 comments on commit dbaebe2

Please sign in to comment.