Skip to content

Commit 3a04933

Browse files
authored
Merge pull request #310 from ledeuns/patch-1
Fix building with OpenBSD
2 parents 1cfb870 + 45e9945 commit 3a04933

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
elif platform.system() == 'Darwin':
3232
extra_compile_args = FLAGS_CLANG + MACOS_FLAG
3333
extra_link_args = LFLAGS_CLANG + MACOS_FLAG
34-
elif platform.system() == 'FreeBSD':
34+
elif platform.system() in {'FreeBSD', 'OpenBSD'}:
3535
extra_compile_args = FLAGS_CLANG
3636
extra_link_args = LFLAGS_CLANG
3737
else:
3838
extra_compile_args = FLAGS_POSIX
3939
extra_link_args = LFLAGS_POSIX
4040

41-
if platform.system() in {'Darwin', 'FreeBSD'}:
41+
if platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}:
4242
os.environ.setdefault('CC', 'clang')
4343
os.environ.setdefault('CXX', 'clang++')
4444
orig_customize_compiler = distutils.sysconfig.customize_compiler
@@ -117,7 +117,7 @@ def customize_compiler(compiler):
117117
if get_build_version() < 14.0:
118118
msvc9compiler.get_build_version = lambda: 14.0
119119
msvc9compiler.VERSION = 14.0
120-
elif platform.system() in ('Darwin', 'FreeBSD'):
120+
elif platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}:
121121
# Dirty workaround to avoid link error...
122122
# Python distutils doesn't provide any way
123123
# to configure different flags for each cc and c++.

0 commit comments

Comments
 (0)