From caeca920415bfda9a848381682f2a46795f7541a Mon Sep 17 00:00:00 2001 From: PyYoshi Date: Tue, 28 Mar 2017 17:47:27 +0900 Subject: [PATCH] remove the "-Wstrict-prototypes" compiler option --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 02e9c0c..1639fae 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,11 @@ import os import sys -import platform import glob import codecs import re from distutils.command.build_ext import build_ext +from distutils import sysconfig try: from setuptools import setup, Extension @@ -84,6 +84,12 @@ uchardet_sources = [ ] sources += uchardet_sources +# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++. +cfg_vars = sysconfig.get_config_vars() +for key, value in cfg_vars.items(): + if type(value) == str: + cfg_vars[key] = value.replace("-Wstrict-prototypes", "") + cchardet_module = Extension( 'cchardet._cchardet', sources=sources,