[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#785261: python-apt: Remove the "-Wstrict-prototypes" compiler option



Le 15.05.2015 12:33, Julian Andres Klode a écrit :

On Fri, May 15, 2015 at 12:26:28PM +0200, Julian Andres Klode wrote:

Hi,

thanks for your patch. I seriously dislike pseudonymous contributions,
would it be possible that you resubmit this with your real name, or does
this pose a risk to you?

And it would be great if the email address of the patch would match the
bug report email address.

Hi,

I send you a new patch with an email address matching the bug report email adress.

I prefer, for now, to keep using the same pseudonym.

I don't know the reasons of your dislike of pseudonym but you are the maintainer, so it's up
to you to commit or not, the different patches.

Regards,

von

 
From e733918b23d095a2ecdede4f647bd8f6f225aa7b Mon Sep 17 00:00:00 2001
From: von <matvon@mailoo.org>
Date: Thu, 14 May 2015 00:19:10 +0200
Subject: [PATCH] Remove the "-Wstrict-prototypes" compiler option, which isn't
 valid for C++. See http://bugs.python.org/issue9031 and
 http://bugs.python.org/issue1222585

---
 setup.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/setup.py b/setup.py
index 56f5c53..f9d5638 100644
--- a/setup.py
+++ b/setup.py
@@ -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",
-- 
2.1.4


Reply to: