Skip to content

Commit

Permalink
MAINT: Remove compile flag that is no longer needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris Vankerschaver committed Jan 24, 2016
1 parent a5138f0 commit 6a225e7
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def run(self):
class CheckingBuildExt(build_ext):
"""
Subclass build_ext to get clearer report if Cython is necessary.
Also, add some platform based compiler flags.
"""

def check_cython_extensions(self, extensions):
Expand All @@ -304,27 +304,8 @@ def check_cython_extensions(self, extensions):

def build_extensions(self):
self.check_cython_extensions(self.extensions)
self.add_gnu_inline_flag(self.extensions)
build_ext.build_extensions(self)

def add_gnu_inline_flag(self, extensions):
'''
Add CFLAGS `-fgnu89-inline` for clang on FreeBSD 10+
'''
if not platform.system() == 'FreeBSD':
return

try:
bsd_release = float(platform.release().split('-')[0])
except ValueError: # unknow freebsd version
return

if bsd_release < 10: # 9 or earlier still using gcc42
return

for ext in extensions:
ext.extra_compile_args += ['-fgnu89-inline']


class CythonCommand(build_ext):
"""Custom distutils command subclassed from Cython.Distutils.build_ext
Expand Down

0 comments on commit 6a225e7

Please sign in to comment.