summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2013-12-24 22:19:02 +0000
committerMartin Pitt <martinpitt@gnome.org>2013-12-27 13:57:16 +0100
commit2ff095ea0b0c05fbf6cc332eeadf26cfeb9e69f7 (patch)
tree9f518335347a0b53cc0bcbadf34d205d3c326145
parentb9716853fb7727fcf2b5ea59a3368d5a5b2e6be2 (diff)
downloadpygobject-2ff095ea0b0c05fbf6cc332eeadf26cfeb9e69f7.tar.gz
build: Avoid clash between gi/types.py and stdlib
Use non-recursive make for the Python modules in gi/ to work around a clash between gi/types.py and the standard library's types module when running py-compile. https://bugzilla.gnome.org/show_bug.cgi?id=721025 Signed-off-by: Martin Pitt <martinpitt@gnome.org>
-rw-r--r--Makefile.am24
-rw-r--r--gi/Makefile.am20
2 files changed, 26 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index 5051b54c..58d720ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = 1.7
+# Part of the gi subdirectory is handled with non-recursive make to avoid
+# py-compile getting confused between gi/types.py and Python's standard
+# types module.
SUBDIRS = examples gi tests pygtkcompat
PLATFORM_VERSION = 3.0
@@ -49,6 +52,27 @@ MAINTAINERCLEANFILES = \
BUILT_EXTRA_DIST = \
ChangeLog
+nobase_pyexec_PYTHON = \
+ gi/__init__.py \
+ gi/types.py \
+ gi/module.py \
+ gi/importer.py \
+ gi/pygtkcompat.py \
+ gi/docstring.py
+
+# if we build in a separate tree, we need to symlink the *.py files from the
+# source tree; Python does not accept the extensions and modules in different
+# paths
+build_pylinks:
+ for f in $(nobase_pyexec_PYTHON); do \
+ [ -e $(builddir)/$$f ] || \
+ $(LN_S) $(abs_srcdir)/$$f $(builddir)/$$f; \
+ done
+
+all-local: build_pylinks
+
+check-local: build_pylinks
+
# pkg-config files
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
diff --git a/gi/Makefile.am b/gi/Makefile.am
index fc11ff82..aa91a464 100644
--- a/gi/Makefile.am
+++ b/gi/Makefile.am
@@ -26,14 +26,6 @@ endif
pygidir = $(pyexecdir)/gi
-pygi_PYTHON = \
- __init__.py \
- types.py \
- module.py \
- importer.py \
- pygtkcompat.py \
- docstring.py
-
pygi_LTLIBRARIES = _gi.la
_gi_la_SOURCES = \
@@ -118,16 +110,8 @@ _gi_cairo_la_LDFLAGS = \
%$(PYTHON_SO): %.la
$(LN_S) -f .libs/$@ $@
-# if we build in a separate tree, we need to symlink the *.py files from the
-# source tree; Python does not accept the extensions and modules in different
-# paths
-build_pylinks:
- for f in $(pygi_PYTHON); do \
- [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
- done
-
-all-local: $(LTLIBRARIES:.la=$(PYTHON_SO)) build_pylinks
+all-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
-check-local: $(LTLIBRARIES:.la=$(PYTHON_SO)) build_pylinks
+check-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
clean-local:
rm -f $(LTLIBRARIES:.la=$(PYTHON_SO))