From f8a5dbd960b40f0d8cd4159e8caf0757dc34f99f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 6 Jun 2005 10:09:48 +0000 Subject: [PATCH] get python version without awk and cut [simpler] --- src/Makefile | 2 +- src/common/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 91788bc86..18d124b05 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ # Set the C flags to include the GTK+ and Python libraries -PYTHONVER = `python -V 2>&1 | awk '{print $$2}' | cut -f1,2 -d.` +PYTHONVER = `python -c 'import sys; print sys.version[:3]'` CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fPIC -I/usr/include/python$(PYTHONVER) -I. LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` diff --git a/src/common/Makefile b/src/common/Makefile index a9960bbbc..bba661253 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,5 +1,5 @@ # Set the C flags to include the GTK+ and Python libraries -PYTHONVER = `python -V 2>&1 | awk '{print $$2}' | cut -f1,2 -d.` +PYTHONVER = `python -c 'import sys; print sys.version[:3]'` CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -fpic -I/usr/include/python$(PYTHONVER) -I. LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`