From 51c6abd201adc116212ec7a5d30fa8183fb10b59 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Sun, 14 Oct 2012 16:05:45 +0900 Subject: [PATCH 1/2] Add /opt/local to re2 search path (it's the macports default) --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index b4848267..8d676b79 100755 --- a/setup.py +++ b/setup.py @@ -48,6 +48,7 @@ def normalize(v): '/usr', '/usr/local', '/opt/', + '/opt/local', ] for re2_prefix in _re2_prefixes: From a75720df5feb28c38f8f923a60e5a8a623562031 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Sun, 14 Oct 2012 16:13:25 +0900 Subject: [PATCH 2/2] Just use an empty re2_prefix if none of the hardcoded ones are found - there's a good enough chance it'll work anyways. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8d676b79..ffa03eef 100755 --- a/setup.py +++ b/setup.py @@ -48,14 +48,15 @@ def normalize(v): '/usr', '/usr/local', '/opt/', - '/opt/local', ] for re2_prefix in _re2_prefixes: if os.path.exists(os.path.join(re2_prefix, "include", "re2")): break else: - raise OSError("Cannot find RE2 library. Please install it from http://code.google.com/p/re2/wiki/Install") + # Hopefully the build environment is setup to include the re2 library + # default, so try with an empty prefix. + re2_prefix = '' BASE_DIR = os.path.dirname(__file__)