Skip to content

Commit

Permalink
Merge pull request hummingbot#3119 from TheHolyRoger/fix/strict-proto…
Browse files Browse the repository at this point in the history
…types-warning

Fix / Disable `-Wstrict-prototypes` warning during build
  • Loading branch information
dennisocana authored Apr 1, 2021
2 parents 961e7b1 + 1d155b6 commit 95d2cda
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

from setuptools import setup
from setuptools.command.build_ext import build_ext
from Cython.Build import cythonize
import numpy as np
import os
Expand All @@ -17,6 +18,16 @@
os.environ["CFLAGS"] = "-std=c++11"


# Avoid a gcc warning below:
# cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid
# for C/ObjC but not for C++
class BuildExt(build_ext):
def build_extensions(self):
if '-Wstrict-prototypes' in self.compiler.compiler_so:
self.compiler.compiler_so.remove('-Wstrict-prototypes')
super().build_extensions()


def main():
cpu_count = os.cpu_count() or 8
version = "20210309"
Expand Down Expand Up @@ -165,6 +176,7 @@ def main():
"bin/hummingbot.py",
"bin/hummingbot_quickstart.py"
],
cmdclass={'build_ext': BuildExt},
)


Expand Down

0 comments on commit 95d2cda

Please sign in to comment.