Skip to content

Commit c251acb

Browse files
committed
Travis compile fix
1 parent 4a782ff commit c251acb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,18 @@
2424
and sys.version_info[1] < 3):
2525
requirements.append('ipaddr')
2626

27+
compile_args = ['-Wall', '-Wextra']
28+
29+
if sys.version_info[0] == 2:
30+
compile_args.append('-fno-strict-aliasing')
31+
32+
2733
ext_module = [
2834
Extension(
2935
'maxminddb.extension',
3036
libraries=['maxminddb'],
3137
sources=['maxminddb/extension/maxminddb.c'],
32-
extra_compile_args=[
33-
'-Wall', '-Wextra'],
38+
extra_compile_args=compile_args,
3439
)
3540
]
3641

0 commit comments

Comments
 (0)