diff options
author | von <matvon@mailoo.org> | 2015-05-14 00:19:10 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2015-05-29 22:34:52 +0200 |
commit | 1546cdfe105754af2bc685f40bfe985bae3d72e1 (patch) | |
tree | 88b8993f9c2ded4bf70fb2b868b8701070d4da95 | |
parent | 1dabbd8dda5ce7d41b68e5150db4a5fd2877fa18 (diff) | |
download | python-apt-1546cdfe105754af2bc685f40bfe985bae3d72e1.tar.gz |
Remove the "-Wstrict-prototypes" compiler option
It isn't valid for C++.
See: http://bugs.python.org/issue9031,
http://bugs.python.org/issue1222585
[jak@debian.org: Reworded commit message]
-rw-r--r-- | setup.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -6,6 +6,7 @@ import os import sys from distutils.core import setup, Extension +from distutils import sysconfig cmdclass = {} try: @@ -54,6 +55,12 @@ if len(sys.argv) > 1 and sys.argv[1] == "build": import shutil shutil.copy(template, os.path.join("build", template)) +# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++. +# See http://bugs.python.org/issue9031 and http://bugs.python.org/issue1222585 +cfg_vars = sysconfig.get_config_vars() +for key, value in cfg_vars.items(): + if type(value) == str: + cfg_vars[key] = value.replace("-Wstrict-prototypes", "") setup(name="python-apt", description="Python bindings for APT", |