remove the "-Wstrict-prototypes" compiler option
This commit is contained in:
parent
61e6667105
commit
caeca92041
1 changed files with 7 additions and 1 deletions
8
setup.py
8
setup.py
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import platform
|
|
||||||
import glob
|
import glob
|
||||||
import codecs
|
import codecs
|
||||||
import re
|
import re
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
|
from distutils import sysconfig
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
|
@ -84,6 +84,12 @@ uchardet_sources = [
|
||||||
]
|
]
|
||||||
sources += 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_module = Extension(
|
||||||
'cchardet._cchardet',
|
'cchardet._cchardet',
|
||||||
sources=sources,
|
sources=sources,
|
||||||
|
|
Loading…
Reference in a new issue