From 67930df36518010c66be3aac86b0e0125102e3ec Mon Sep 17 00:00:00 2001 From: kxxt Date: Wed, 3 May 2023 20:59:14 +0800 Subject: [PATCH] Split compiler flags by whitespace. Previously setup.py splits compiler flags by a single whitespace, which causes build failures when there are two space characters causing an extra empty string being added to the compiler command line. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 54905a6..e2acaf2 100644 --- a/setup.py +++ b/setup.py @@ -19,9 +19,9 @@ def conditional_decode( string ): return string return string.decode( 'utf-8' ) -polymake_cflags = conditional_decode( subprocess.check_output( [ "polymake-config", "--cflags" ] ).strip() ).split(' ') -polymake_cflags += conditional_decode( subprocess.check_output( [ "polymake-config", "--includes" ] ).strip() ).split(' ') -polymake_ldflags = conditional_decode( subprocess.check_output( [ "polymake-config", "--ldflags" ] ).strip() ).split(' ') +polymake_cflags = conditional_decode( subprocess.check_output( [ "polymake-config", "--cflags" ] ).strip() ).split() +polymake_cflags += conditional_decode( subprocess.check_output( [ "polymake-config", "--includes" ] ).strip() ).split() +polymake_ldflags = conditional_decode( subprocess.check_output( [ "polymake-config", "--ldflags" ] ).strip() ).split() polymake_ldflags += [ "-lpolymake" ] polymake_cc = conditional_decode( subprocess.check_output( [ "polymake-config", "--cc" ] ).strip() )