[gtk-builder-win] python-config: improve a bit more the script to not show duplicates
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-builder-win] python-config: improve a bit more the script to not show duplicates
- Date: Tue, 15 Jul 2014 07:02:37 +0000 (UTC)
commit 9cf2c4ad09275c74dd3370988785daf04e5188c7
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Jul 15 09:02:17 2014 +0200
python-config: improve a bit more the script to not show duplicates
win32/z_Install/Tools/python2.7-config | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/win32/z_Install/Tools/python2.7-config b/win32/z_Install/Tools/python2.7-config
index a4dbd67..05944a0 100755
--- a/win32/z_Install/Tools/python2.7-config
+++ b/win32/z_Install/Tools/python2.7-config
@@ -18,17 +18,20 @@ pyver = sysconfig.get_config_var('VERSION')
opt_flags = [flag for (flag, val) in opts]
+flags = None
+libs = []
for opt in opt_flags:
if opt in ('--includes', '--cflags'):
flags = '-I' + sysconfig.get_python_inc(plat_specific=True)
flags = flags.replace('\\', '/')
- print(flags)
- elif opt in ('--libs', '--ldflags'):
- libs = ['-lpython' + pyver]
-
- if opt == '--ldflags':
- p = os.path.join (sys.prefix, 'libs')
- p = p.replace ('\\', '/')
- libs.insert(0, '-L' + p)
-
- print(' '.join(libs))
+ elif opt == '--libs':
+ libs.append('-lpython' + pyver)
+ elif opt == '--ldflags':
+ p = os.path.join (sys.prefix, 'libs')
+ p = p.replace ('\\', '/')
+ libs.insert(0, '-L' + p)
+
+if flags:
+ print(flags)
+elif len(libs) > 0:
+ print(' '.join(libs))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]