Skip to content

Commit

Permalink
Merge pull request axiak#18 from offlinehacker/master
Browse files Browse the repository at this point in the history
setup.py: Continue with default lib paths if not detected automatically
  • Loading branch information
axiak committed Aug 12, 2013
2 parents 543f228 + 55eb585 commit 382bb74
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def normalize(v):
'/usr',
'/usr/local',
'/opt/',
]
]

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")
re2_prefix = ""

BASE_DIR = os.path.dirname(__file__)

Expand All @@ -81,14 +81,17 @@ def main():
license="New BSD License",
author_email = "mike@axiak.net",
url = "http://github.com/axiak/pyre2/",
ext_modules = [Extension("re2",
ext_files,
language="c++",
include_dirs=[os.path.join(re2_prefix, "include")],
libraries=["re2"],
library_dirs=[os.path.join(re2_prefix, "lib")],
runtime_library_dirs=[os.path.join(re2_prefix, "lib")],
)],
ext_modules = [
Extension(
"re2",
ext_files,
language="c++",
include_dirs=[os.path.join(re2_prefix, "include")] if re2_prefix else [],
libraries=["re2"],
library_dirs=[os.path.join(re2_prefix, "lib")] if re2_prefix else [],
runtime_library_dirs=[os.path.join(re2_prefix, "lib")] if re2_prefix else [],
)
],
cmdclass=cmdclass,
classifiers = [
'License :: OSI Approved :: BSD License',
Expand Down

0 comments on commit 382bb74

Please sign in to comment.