From 7f444d1d38ffe116864a956b6b56e38baa3e6caf Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 24 Jul 2017 09:47:23 -0400 Subject: [PATCH] Work around pypy incompatibility with distutils.sysconfig --- aksetup_helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aksetup_helper.py b/aksetup_helper.py index a63576f..5dc1413 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -163,7 +163,10 @@ def hack_distutils(debug=False, fast_link=True, what_opt=3): cflags.append("-DNDEBUG") cvars['OPT'] = str.join(' ', cflags) - cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] + if "BASECFLAGS" in cvars: + cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] + else: + assert "CFLAGS" in cvars if fast_link: for varname in ["LDSHARED", "BLDSHARED"]: -- GitLab