Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better automatic checking for python version

(should switch to a real build system eventually :( )
  • Loading branch information...
commit f3e05a51f4f4957dd014ca542bb1d56d219f3726 1 parent 22512b3
@mnunberg authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 Makefile
View
10 Makefile
@@ -1,5 +1,6 @@
-PYVERSION?=2.5
ifndef MINGW
+ PYVERSION?=$(shell python -c "import sys; print '.'.join([str(v) for v in sys.version_info[:2]])")
+ PYCONFIG=python$(PYVERSION)-config
CC=gcc
INCLUDES=$(shell pkg-config purple --cflags)
LIBS=$(shell pkg-config purple --libs)
@@ -10,13 +11,14 @@ ifndef MINGW
PYMODULE_SUFFIX:=$(LIBSUFFIX)
EXEC=yobot
TPL=contrib/tpl.a
- PYHDR=-I/usr/include/python$(PYVERSION)
- PYLIB=
+ PYHDR=$(shell $(PYCONFIG) --cflags)
+ PYLIB=$(shell $(PYCONFIG) --libs)
CLEAN_EXTRA=$(TPL)
PROTCLIENT_EXTRA_LIBS=
MODULES=
LOGGER_EXTRA_LIBS=$(shell ncurses5-config --libs)
-else
+else
+ PYVERSION?=2.6
BINPREFIX=i586-mingw32msvc-
CC=$(BINPREFIX)gcc
AR=$(BINPREFIX)ar

0 comments on commit f3e05a5

Please sign in to comment.
Something went wrong with that request. Please try again.