Skip to content

Commit 4a6566e

Browse files
committed
Fix problem compiling package under FreeBSD
Fixes #34 Using OS X dirty hack for FreeBSD
1 parent 1695a1b commit 4a6566e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def spawn(self, cmd):
7474
else:
7575
flags = ['-fPIC', '-std=c++0x', '-Wall', '-Wno-parentheses']
7676
platform.mac_ver()
77-
if platform.system() == 'Darwin':
77+
if platform.system() in ['Darwin', 'FreeBSD']:
7878
os.environ['CC'] = os.environ['CXX'] = 'c++'
7979
orig_customize_compiler = distutils.sysconfig.customize_compiler
8080

@@ -88,12 +88,13 @@ def customize_compiler(compiler):
8888
distutils.sysconfig.customize_compiler = customize_compiler
8989
flags.extend([
9090
'-stdlib=libc++',
91-
'-mmacosx-version-min=10.7',
9291
])
93-
if tuple(map(int, platform.mac_ver()[0].split('.'))) >= (10, 9):
94-
flags.append(
95-
'-Wno-error=unused-command-line-argument-hard-error-in-future',
96-
)
92+
if platform.system() == 'Darwin':
93+
flags.append('-mmacosx-version-min=10.7',)
94+
if tuple(map(int, platform.mac_ver()[0].split('.'))) >= (10, 9):
95+
flags.append(
96+
'-Wno-error=unused-command-line-argument-hard-error-in-future',
97+
)
9798
# Dirty workaround to avoid link error...
9899
# Python distutils doesn't provide any way to configure different
99100
# flags for each cc and c++.

0 commit comments

Comments
 (0)