This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 188ea2197a3fdfddccedad25a563c9ee92059abf (commit) from 86bcd463620e8f23223be4ba6aa7c119431a17ff (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/188ea2197a3fdfddccedad25a563c9ee92059...
commit 188ea2197a3fdfddccedad25a563c9ee92059abf Author: Cyril Hrubis metan@ucw.cz Date: Fri Feb 22 13:05:11 2013 +0100
build: Add check for python-config.
To compile python bindings both swig and python-devel packages are needed.
Add check for python-config.
Now the bindings could be compiled for different python versions by:
./configure --PYTHON_CONFIG=python-config-2.7
However the path for python binary is not yet adjusted for the tests and demos.
diff --git a/config.mk b/config.mk index 5a05ef1..c149a0c 100644 --- a/config.mk +++ b/config.mk @@ -1,10 +1,13 @@ include $(TOPDIR)/config.gen.mk + CFLAGS+=-I$(TOPDIR)/include/
# path to local module directory PYLIBSDIR=$(TOPDIR)/pylib
-PYTHON_INCLUDE=`python-config --include` +ifdef PYTHON_CONFIG +PYTHON_INCLUDE=$(shell $(PYTHON_CONFIG) --include) +endif
# To test with other python versions (example): #PYTHON_BIN=${TOPDIR}/virtualpy2.4/bin/python diff --git a/configure b/configure index 4e23935..8704716 100755 --- a/configure +++ b/configure @@ -59,7 +59,18 @@ def check_for_swig(cfg): sys.stderr.write('Non') cfg['SWIG'][0] = '' else: - sys.stderr.write("Yesn") + sys.stderr.write('Yesn') + +def check_for_python_config(cfg): + sys.stderr.write("Checking for python-config ... ") + + ret = os.system("%s --libs > /dev/null 2>&1" % cfg['PYTHON_CONFIG'][0]) + + if ret: + sys.stderr.write('Non') + cfg['PYTHON_CONFIG'][0] = '' + else: + sys.stderr.write('Yesn')
# # Library checking api @@ -164,14 +175,15 @@ def die_screaming(msg): def basic_checks(cfg): sys.stderr.write("Basic checksn") sys.stderr.write("------------n") - + if not c_compiler_exists(cfg): die_screaming("No C compiler found") - + if not python_module_installed(cfg, 'jinja2'): die_screaming("No jinja2 python module found") - + check_for_swig(cfg) + check_for_python_config(cfg) sys.stderr.write("n")
# @@ -179,6 +191,7 @@ def basic_checks(cfg): # def write_config_h(cfg, libs): f = open("config.h", "w") + f.write("/*n * This file is genereated by configure scriptn */n"); f.write("#ifndef CONFIG_Hn#define CONFIG_Hnn") libs.write_config_h(f); f.write("#endif /* CONFIG_H */n"); @@ -237,11 +250,12 @@ if __name__ == '__main__': # # Dictionary for default configuration parameters # - cfg = {'CC' : ['gcc', 'Path/name of the C compiler'], - 'CFLAGS' : ['-pthread -W -Wall -Wextra -fPIC -O2 -ggdb -D_FORTIFY_SOURCE=2', 'C compiler flags'], - 'PYTHON_BIN' : ['python', 'Path/name of python interpreter'], - 'SWIG' : ['swig', 'Simplified Wrapper and Interface Generator'], - 'include_path': ['/usr/include', 'Path to the system headers']} + cfg = {'CC' : ['gcc', 'Path/name of the C compiler'], + 'CFLAGS' : ['-pthread -W -Wall -Wextra -fPIC -O2 -ggdb -D_FORTIFY_SOURCE=2', 'C compiler flags'], + 'PYTHON_BIN' : ['python', 'Path/name of python interpreter'], + 'SWIG' : ['swig', 'Simplified Wrapper and Interface Generator'], + 'PYTHON_CONFIG' : ['python-config', 'Python config helper'], + 'include_path' : ['/usr/include', 'Path to the system headers']}
# # Library detection/enable disable diff --git a/pywrap.mk b/pywrap.mk index f41ce63..4518b71 100644 --- a/pywrap.mk +++ b/pywrap.mk @@ -7,7 +7,8 @@ SWIG_C=$(LIBNAME)_wrap.c SWIG_PY=c_$(LIBNAME).py SWIG_LIB=_c_$(LIBNAME).so
-ifneq ($(SWIG),) +ifdef SWIG +ifdef PYTHON_CONFIG
INCLUDES+=$(addprefix -I$(TOPDIR)/include/, $(INCLUDE))
@@ -33,6 +34,7 @@ else # VERBOSE @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ endif # VERBOSE
-endif # ifneq ($(SWIG),) +endif # PYTHON_CONFIG +endif # SWIG
CLEAN+=$(SWIG_C) $(SWIG_PY) $(SWIG_LIB) *.pyc
-----------------------------------------------------------------------
Summary of changes: config.mk | 5 ++++- configure | 32 +++++++++++++++++++++++--------- pywrap.mk | 6 ++++-- 3 files changed, 31 insertions(+), 12 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.