summaryrefslogtreecommitdiff
path: root/python/pygobject3/python3.4.patch
blob: c71af55b50aef28f4ab20cc22e6a1bc899246003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From 2ff095ea0b0c05fbf6cc332eeadf26cfeb9e69f7 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 24 Dec 2013 22:19:02 +0000
Subject: 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>

diff --git a/Makefile.am b/Makefile.am
index 5051b54..58d720f 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 fc11ff8..aa91a46 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))
-- 
cgit v0.10.1