dee

Merge lp:~mhr3/dee/pygi-overrides-dir into lp:dee

Proposed by Michal Hruby on 2012-06-28
Status: Merged
Approved by: Didier Roche on 2012-06-28
Approved revision: 371
Merged at revision: 371
Proposed branch: lp:~mhr3/dee/pygi-overrides-dir
Merge into: lp:dee
Diff against target: 57 lines (+24/-4)
3 files modified
Makefile.am (+1/-1)
bindings/python/Makefile.am (+1/-3)
configure.ac (+22/-0)
To merge this branch: bzr merge lp:~mhr3/dee/pygi-overrides-dir
Reviewer Review Type Date Requested Status
Didier Roche 2012-06-28 Approve on 2012-06-28
Review via email: mp+112514@code.launchpad.net

Commit Message

Invoke python to determine pygi overrides directory

Description of the Change

Invoke python to determine pygi overrides directory.

To post a comment you must log in.
Didier Roche (didrocks) wrote :

There is an AC_MSG_CHECKING, how to say no? ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2012-01-25 21:14:58 +0000
3+++ Makefile.am 2012-06-28 08:58:21 +0000
4@@ -24,7 +24,7 @@
5 dee-icu-1.0.pc.in \
6 COPYING.GPL
7
8-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection=no
9+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection=no --with-pygi-overrides-dir='$$(pyexecdir)'/gi/overrides
10
11 benchmark:
12 cd tests && make benchmark
13
14=== modified file 'bindings/python/Makefile.am'
15--- bindings/python/Makefile.am 2012-06-27 15:47:34 +0000
16+++ bindings/python/Makefile.am 2012-06-28 08:58:21 +0000
17@@ -1,6 +1,4 @@
18-pkgpyexecdir = $(pyexecdir)/gi
19-
20-pygioverridesdir = $(pkgpyexecdir)/overrides
21+pygioverridesdir = $(PYGI_OVERRIDES_DIR)
22 pygioverrides_PYTHON = \
23 Dee.py
24
25
26=== modified file 'configure.ac'
27--- configure.ac 2012-06-27 15:56:18 +0000
28+++ configure.ac 2012-06-28 08:58:21 +0000
29@@ -22,6 +22,28 @@
30
31 AM_PATH_PYTHON
32
33+###############################################
34+### pygobject overrides directory detection ###
35+###############################################
36+
37+AC_ARG_WITH([pygi_overrides_dir],
38+ AC_HELP_STRING([--with-pygi-overrides-dir], [Path to pygobject overrides directory]))
39+
40+AC_MSG_CHECKING(for pygobject overrides directory)
41+if test "x$with_pygi_overrides_dir" = "x" ; then
42+ overrides_dir="`$PYTHON -c 'import gi; print(gi._overridesdir)' 2>/dev/null`"
43+ # fallback if the previous failed
44+ if test "x$overrides_dir" = "x" ; then
45+ overrides_dir="${pyexecdir}/gi/overrides"
46+ fi
47+else
48+ overrides_dir="$with_pygi_overrides_dir"
49+fi
50+
51+PYGI_OVERRIDES_DIR="$overrides_dir"
52+AC_SUBST(PYGI_OVERRIDES_DIR)
53+AC_MSG_RESULT($PYGI_OVERRIDES_DIR)
54+
55 DEE_MAJOR_VERSION=dee_major
56 DEE_MINOR_VERSION=dee_minor
57 DEE_MICRO_VERSION=dee_micro

Subscribers

People subscribed via source and target branches

to all changes: