diff options
author | D.J. Sutherland <djs@djsutherland.ml> | 2020-05-13 14:21:54 -0500 |
---|---|---|
committer | D.J. Sutherland <djs@djsutherland.ml> | 2020-05-13 14:39:03 -0500 |
commit | a91d88847531e3d9b889881770db9dcbb4b41389 (patch) | |
tree | c1f125232819536b529bdcb66735015806e96766 /setup.py | |
parent | a9a0050fb15124b61bd548d20a95ebc463eec1f4 (diff) |
only mangle CC/etc if on mac and not told not to
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -14,9 +14,6 @@ import subprocess here = path.abspath(path.dirname(__file__)) -os.environ["CC"] = "g++" -os.environ["CXX"] = "g++" - # dirty but working __version__ = re.search( r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too @@ -39,7 +36,9 @@ if 'clean' in sys.argv[1:]: # add platform dependant optional compilation argument -if sys.platform.startswith('darwin'): +if sys.platform.startswith('darwin') and not os.environ.get('POT_LEAVE_CC', ''): + os.environ["CC"] = "g++" + os.environ["CXX"] = "g++" opt_arg.append("-stdlib=libc++") sdk_path = subprocess.check_output(['xcrun', '--show-sdk-path']) os.environ['CFLAGS'] = '-isysroot "{}"'.format(sdk_path.rstrip().decode("utf-8")) |