Merge lp:~peter-pearse/ubuntu/natty/python2.7/prop002 into lp:ubuntu/natty/python2.7

Proposed by Peter Pearse
Status: Needs review
Proposed branch: lp:~peter-pearse/ubuntu/natty/python2.7/prop002
Merge into: lp:ubuntu/natty/python2.7
Diff against target: 508 lines (+302/-16)
4 files modified
debian/changelog (+10/-0)
debian/patches/cross.diff (+172/-0)
debian/patches/series.in (+1/-0)
debian/rules (+119/-16)
To merge this branch: bzr merge lp:~peter-pearse/ubuntu/natty/python2.7/prop002
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+52712@code.launchpad.net

Description of the change

Note that https://code.launchpad.net/~peter-pearse/ubuntu/natty/python2.7/prop001 has been left in order to preserve review comments but is SUPERSEDED by this branch.

Please review in parallel with https://code.launchpad.net/~peter-pearse/ubuntu/natty/python2.6/prop002 which is very similar.

To post a comment you must log in.

Unmerged revisions

28. By Peter Pearse

s patch - for detilas see debian/changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-02-24 06:01:42 +0000
+++ debian/changelog 2011-03-09 16:31:57 +0000
@@ -1,3 +1,13 @@
1python2.7 (2.7.1-5ubuntu1) natty; urgency=low
2
3 * Makefile.pre.in - Use BUILDPYTHON where applicable for cross builds.
4 * setup.py - For cross builds, pass cross toolchain info in python
5 environment.
6 * debian/rules - Build a build host python for use during a cross
7 build. Adjust the configuration files & make environment accordingly.
8
9 -- Peter Pearse <peter.pearse@linaro.org> Wed, 09 Mar 2011 15:14:43 +0000
10
1python2.7 (2.7.1-5) experimental; urgency=low11python2.7 (2.7.1-5) experimental; urgency=low
212
3 * Update to 20110224, taken from the 2.7 branch.13 * Update to 20110224, taken from the 2.7 branch.
414
=== added file 'debian/patches/cross.diff'
--- debian/patches/cross.diff 1970-01-01 00:00:00 +0000
+++ debian/patches/cross.diff 2011-03-09 16:31:57 +0000
@@ -0,0 +1,172 @@
1diff -Nru p/Makefile.pre.in p_p/Makefile.pre.in
2--- p/Makefile.pre.in 2011-03-08 16:00:53.000000000 +0000
3+++ p_p/Makefile.pre.in 2011-03-09 10:11:07.000000000 +0000
4@@ -214,6 +214,9 @@
5 ##########################################################################
6 # Parser
7 PGEN= Parser/pgen$(EXE)
8+# Allow override for cross build
9+BUILDPGEN= $(PGEN)
10+
11
12 POBJS= \
13 Parser/acceler.o \
14@@ -365,7 +368,7 @@
15
16 # Default target
17 all: build_all
18-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
19+build_all: $(PYTHON) oldsharedmods sharedmods gdbhooks
20
21 # Compile a binary with gcc profile guided optimization.
22 profile-opt:
23@@ -395,17 +398,17 @@
24
25
26 # Build the interpreter
27-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
28+$(PYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
29 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
30 Modules/python.o \
31 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
32
33-platform: $(BUILDPYTHON)
34+platform: $(PYTHON)
35 $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
36
37
38 # Build the shared modules
39-sharedmods: $(BUILDPYTHON)
40+sharedmods: $(PYTHON)
41 @case $$MAKEFLAGS in \
42 *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
43 *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
44@@ -443,11 +446,11 @@
45 #
46 # Distributors are likely to want to install this somewhere else e.g. relative
47 # to the stripped DWARF data for the shared library.
48-gdbhooks: $(BUILDPYTHON)-gdb.py
49+gdbhooks: $(PYTHON)-gdb.py
50
51 SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py
52-$(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
53- $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
54+$(PYTHON)-gdb.py: $(SRC_GDB_HOOKS)
55+ $(INSTALL_DATA) $(SRC_GDB_HOOKS) $(PYTHON)-gdb.py
56
57 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
58 # minimal framework (not including the Lib directory and such) in the current
59@@ -541,9 +544,9 @@
60
61 # Use a stamp file to prevent make -j invoking pgen twice
62 $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
63-Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
64+Parser/pgen.stamp: $(BUILDPGEN) $(GRAMMAR_INPUT)
65 -@$(INSTALL) -d Include
66- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
67+ $(BUILDPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
68 -touch Parser/pgen.stamp
69
70 $(PGEN): $(PGENOBJS)
71@@ -802,7 +805,7 @@
72
73 # Install the interpreter with $(VERSION) affixed
74 # This goes into $(exec_prefix)
75-altbininstall: $(BUILDPYTHON)
76+altbininstall: $(PYTHON)
77 @for i in $(BINDIR) $(LIBDIR); \
78 do \
79 if test ! -d $(DESTDIR)$$i; then \
80@@ -811,7 +814,7 @@
81 else true; \
82 fi; \
83 done
84- $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
85+ $(INSTALL_PROGRAM) $(PYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
86 if test -f $(LDLIBRARY); then \
87 if test -n "$(DLLLIBRARY)" ; then \
88 $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
89@@ -1137,7 +1140,7 @@
90 config.status: $(srcdir)/configure
91 $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
92
93-.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
94+.PRECIOUS: config.status $(PYTHON) Makefile Makefile.pre
95
96 # Some make's put the object file in the current directory
97 .c.o:
98@@ -1189,7 +1192,7 @@
99 find . -name '*.gc??' -exec rm -f {} ';'
100
101 clobber: clean profile-removal
102- -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
103+ -rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
104 tags TAGS Parser/pgen.stamp \
105 config.cache config.log pyconfig.h Modules/config.c
106 -rm -rf build platform
107diff -Nru p/Modules/Setup.dist p_p/Modules/Setup.dist
108--- p/Modules/Setup.dist 2011-03-08 16:00:53.000000000 +0000
109+++ p_p/Modules/Setup.dist 2011-03-08 16:53:15.000000000 +0000
110@@ -458,7 +458,9 @@
111 # Andrew Kuchling's zlib module.
112 # This require zlib 1.1.3 (or later).
113 # See http://www.gzip.org/zlib/
114-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
115+# Well behaved toolchains should not require -L$(exec_prefix)/lib
116+# - using it breaks cross builds
117+#zlib zlibmodule.c -I$(prefix)/include -lz
118
119 # Interface to the Expat XML parser
120 #
121diff -Nru p/setup.py p_p/setup.py
122--- p/setup.py 2011-03-08 16:00:53.000000000 +0000
123+++ p_p/setup.py 2011-03-08 16:56:34.000000000 +0000
124@@ -225,6 +225,22 @@
125 # When you run "make CC=altcc" or something similar, you really want
126 # those environment variables passed into the setup.py phase. Here's
127 # a small set of useful ones.
128+
129+ # Change the environment for cross compiling
130+ # - may want to use environment variables for settings?
131+ if os.environ.get('CROSS_COMPILE'):
132+ exec_prefix=os.environ.get('CROSS_COMPILE')
133+ os.environ["CC"] = exec_prefix + '-gcc'
134+ os.environ["CXX"] = exec_prefix + '-g++'
135+ os.environ["LDSHARED"] = exec_prefix + '-gcc -shared'
136+ os.environ["CPP"] = exec_prefix + '-cpp'
137+ os.environ["LDFLAGS"] = '-L /usr/' + exec_prefix + '/lib -L /usr/' + exec_prefix + '/usr/lib'
138+ os.environ["CFLAGS"] = '-I/usr/' + exec_prefix + '/include -I/usr/' + exec_prefix + '/usr/include'
139+ # Use -D markers to detect if/where used
140+ os.environ["CPPFLAGS"] = '-DCPPFLAGS'
141+ os.environ["BASECFLAGS"] = '-DBASECFLAGS'
142+ os.environ["OPT"] = '-DOPT'
143+
144 compiler = os.environ.get('CC')
145 args = {}
146 # unfortunately, distutils doesn't let us provide separate C and C++
147@@ -304,6 +320,13 @@
148 self.announce('WARNING: skipping import check for Cygwin-based "%s"'
149 % ext.name)
150 return
151+
152+ # Cant import cross built modules
153+ if os.environ.get('CROSS_COMPILE'):
154+ self.announce('WARNING: skipping import check for %s, cross built for %s'
155+ % (ext.name, os.environ.get('CROSS_COMPILE')))
156+ return
157+
158 ext_filename = os.path.join(
159 self.build_lib,
160 self.get_ext_filename(self.get_ext_fullname(ext.name)))
161@@ -1848,6 +1871,11 @@
162 mkpath(ffi_builddir)
163 config_args = []
164
165+ if os.environ.get('CROSS_COMPILE'):
166+ exec_prefix = os.environ.get('CROSS_COMPILE')
167+ print "Configuring _ctypes module for cross building %s" % (exec_prefix)
168+ config_args = [ '--host ' + exec_prefix]
169+
170 # Pass empty CFLAGS because we'll just append the resulting
171 # CFLAGS to Python's; -g or -O2 is to be avoided.
172 cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
0173
=== modified file 'debian/patches/series.in'
--- debian/patches/series.in 2011-02-24 06:01:42 +0000
+++ debian/patches/series.in 2011-03-09 16:31:57 +0000
@@ -50,3 +50,4 @@
50issue9054.diff50issue9054.diff
51link-system-expat.diff51link-system-expat.diff
52plat-gnukfreebsd.diff52plat-gnukfreebsd.diff
53cross.diff
5354
=== modified file 'debian/rules'
--- debian/rules 2011-02-24 06:01:42 +0000
+++ debian/rules 2011-03-09 16:31:57 +0000
@@ -11,6 +11,8 @@
1111
12DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)12DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
13DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)13DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
14DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
1416
15changelog_values := $(shell dpkg-parsechangelog \17changelog_values := $(shell dpkg-parsechangelog \
16 | awk '/^(Version|Source):/ {print $$2}')18 | awk '/^(Version|Source):/ {print $$2}')
@@ -26,6 +28,10 @@
26ifneq (,$(findstring nobench, $(DEB_BUILD_OPTIONS)))28ifneq (,$(findstring nobench, $(DEB_BUILD_OPTIONS)))
27 WITHOUT_BENCH := yes29 WITHOUT_BENCH := yes
28endif30endif
31ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
32 WITHOUT_BENCH := yes
33 WITHOUT_CHECK := yes
34endif
29ifeq ($(on_buildd),yes)35ifeq ($(on_buildd),yes)
30 ifneq (,$(findstring $(DEB_HOST_ARCH), hppa mips mipsel s390))36 ifneq (,$(findstring $(DEB_HOST_ARCH), hppa mips mipsel s390))
31 WITHOUT_CHECK := yes37 WITHOUT_CHECK := yes
@@ -92,7 +98,17 @@
92endif98endif
93with_fpectl = yes99with_fpectl = yes
94100
95CC = gcc101ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
102 CC = gcc
103 CROSS =
104else
105 CC = $(DEB_HOST_GNU_TYPE)-gcc
106 # Note that make runs the binaries as ./$(app),
107 # - so they must not be absolutely pathed
108 CROSS = BUILDPYTHON=../build-cross/python \
109 BUILDPGEN=../build-cross/Parser/pgen \
110 CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)
111endif
96112
97# on alpha, use -O2 only, use -mieee113# on alpha, use -O2 only, use -mieee
98ifeq ($(DEB_HOST_ARCH),alpha)114ifeq ($(DEB_HOST_ARCH),alpha)
@@ -104,6 +120,9 @@
104endif120endif
105121
106PWD := $(shell pwd)122PWD := $(shell pwd)
123ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
124 buildd_cross := $(CURDIR)/build-cross
125endif
107buildd_static := $(CURDIR)/build-static126buildd_static := $(CURDIR)/build-static
108buildd_shared := $(CURDIR)/build-shared127buildd_shared := $(CURDIR)/build-shared
109buildd_debug := $(CURDIR)/build-debug128buildd_debug := $(CURDIR)/build-debug
@@ -143,7 +162,9 @@
143else162else
144 make_build_target = profile-opt163 make_build_target = profile-opt
145endif164endif
146make_build_target = profile-opt165ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
166 make_build_target = profile-opt
167endif
147168
148build: $(build_target)169build: $(build_target)
149build-all: stamps/stamp-build170build-all: stamps/stamp-build
@@ -168,30 +189,30 @@
168189
169stamps/stamp-build-static: stamps/stamp-configure-static190stamps/stamp-build-static: stamps/stamp-configure-static
170 dh_testdir191 dh_testdir
171 $(MAKE) $(NJOBS) -C $(buildd_static) \192 $(MAKE) $(NJOBS) -C $(buildd_static) $(CROSS) \
172 PROFILE_TASK='$(PROFILE_TASK)' $(make_build_target)193 PROFILE_TASK='$(PROFILE_TASK)' $(make_build_target)
173 touch stamps/stamp-build-static194 touch stamps/stamp-build-static
174195
175stamps/stamp-build-shared: stamps/stamp-configure-shared196stamps/stamp-build-shared: stamps/stamp-configure-shared
176 dh_testdir197 dh_testdir
177 $(MAKE) $(NJOBS) -C $(buildd_shared)198 $(MAKE) $(NJOBS) -C $(buildd_shared) $(CROSS)
178# : # build the shared library199# : # build the shared library
179# $(MAKE) $(NJOBS) -C $(buildd_shared) \200# $(MAKE) $(NJOBS) -C $(buildd_shared) $(CROSS) \
180# libpython$(VER).so201# libpython$(VER).so
181 : # build a static library with PIC objects202 : # build a static library with PIC objects
182 $(MAKE) $(NJOBS) -C $(buildd_shared) \203 $(MAKE) $(NJOBS) -C $(buildd_shared) $(CROSS) \
183 LIBRARY=libpython$(VER)-pic.a libpython$(VER)-pic.a204 LIBRARY=libpython$(VER)-pic.a libpython$(VER)-pic.a
184 touch stamps/stamp-build-shared205 touch stamps/stamp-build-shared
185206
186stamps/stamp-build-debug: stamps/stamp-configure-debug207stamps/stamp-build-debug: stamps/stamp-configure-debug
187 dh_testdir208 dh_testdir
188 $(MAKE) $(NJOBS) -C $(buildd_debug)209 $(MAKE) $(NJOBS) -C $(buildd_debug) $(CROSS)
189 touch stamps/stamp-build-debug210 touch stamps/stamp-build-debug
190211
191stamps/stamp-build-shared-debug: stamps/stamp-configure-shared-debug212stamps/stamp-build-shared-debug: stamps/stamp-configure-shared-debug
192 dh_testdir213 dh_testdir
193 : # build the shared debug library214 : # build the shared debug library
194 $(MAKE) $(NJOBS) -C $(buildd_shdebug) \215 $(MAKE) $(NJOBS) -C $(buildd_shdebug) $(CROSS) \
195 libpython$(VER)_d.so216 libpython$(VER)_d.so
196 touch stamps/stamp-build-shared-debug217 touch stamps/stamp-build-shared-debug
197218
@@ -208,11 +229,52 @@
208 common_configure_args += --with-system-ffi229 common_configure_args += --with-system-ffi
209endif230endif
210231
232ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
233 common_configure_args += \
234 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
235endif
236
211ifeq ($(with_fpectl),yes)237ifeq ($(with_fpectl),yes)
212 common_configure_args += \238 common_configure_args += \
213 --with-fpectl239 --with-fpectl
214endif240endif
215241
242ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
243
244stamps/stamp-configure-cross: stamps/stamp-patch
245 rm -rf $(buildd_cross)
246 mkdir -p $(buildd_cross)
247 cd $(buildd_cross) && \
248 CC=gcc CONFIG_SITE= $(OPTSETTINGS) \
249 ../configure --build $(DEB_BUILD_GNU_TYPE)
250 egrep \
251 "^#($$(awk '$$2 ~ /^extension$$/ {print $$1}' debian/PVER-minimal.README.Debian.in | tr '\012' '|')XX)" \
252 Modules/Setup.dist \
253 | sed -e 's/^#//' -e 's/-Wl,-Bdynamic//;s/-Wl,-Bstatic//' \
254 >> $(buildd_cross)/Modules/Setup.local
255 cd $(buildd_cross) && \
256 ../Modules/makesetup -c ../Modules/config.c.in -s Modules \
257 Modules/Setup.config Modules/Setup.local Modules/Setup
258 mv $(buildd_cross)/config.c $(buildd_cross)/Modules/
259
260 @echo "Each build should use it's own pyconfig.h & Makefile variables"
261 cp $(buildd_cross)/pyconfig.h $(buildd_cross)/pyconfig.h.cross
262 cp $(buildd_cross)/Makefile $(buildd_cross)/Makefile.cross
263
264 touch stamps/stamp-configure-cross
265
266stamps/stamp-build-cross: stamps/stamp-configure-cross
267 dh_testdir
268 $(MAKE) $(NJOBS) -C $(buildd_cross) python Parser/pgen
269 touch stamps/stamp-build-cross
270
271stamps/stamp-configure-shared: stamps/stamp-build-cross
272stamps/stamp-configure-static: stamps/stamp-build-cross
273stamps/stamp-configure-debug: stamps/stamp-build-cross
274stamps/stamp-configure-shared-debug: stamps/stamp-build-cross
275
276endif
277
216stamps/stamp-configure-shared: stamps/stamp-patch278stamps/stamp-configure-shared: stamps/stamp-patch
217 rm -rf $(buildd_shared)279 rm -rf $(buildd_shared)
218 mkdir -p $(buildd_shared)280 mkdir -p $(buildd_shared)
@@ -231,6 +293,12 @@
231 Modules/Setup.config Modules/Setup.local Modules/Setup293 Modules/Setup.config Modules/Setup.local Modules/Setup
232 mv $(buildd_shared)/config.c $(buildd_shared)/Modules/294 mv $(buildd_shared)/config.c $(buildd_shared)/Modules/
233295
296ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
297 @echo "Build python should use the new pyconfig.h & Makefile "
298 cp $(buildd_shared)/pyconfig.h $(buildd_cross)/pyconfig.h
299 cp $(buildd_shared)/Makefile $(buildd_cross)/Makefile
300endif
301
234 touch stamps/stamp-configure-shared302 touch stamps/stamp-configure-shared
235303
236stamps/stamp-configure-static: stamps/stamp-patch304stamps/stamp-configure-static: stamps/stamp-patch
@@ -255,6 +323,12 @@
255 mv -f $(buildd_static)/pyconfig.h.new $(buildd_static)/pyconfig.h323 mv -f $(buildd_static)/pyconfig.h.new $(buildd_static)/pyconfig.h
256 mv $(buildd_static)/config.c $(buildd_static)/Modules/324 mv $(buildd_static)/config.c $(buildd_static)/Modules/
257325
326ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
327 @echo "Build python should use the new pyconfig.h"
328 cp $(buildd_static)/pyconfig.h $(buildd_cross)/pyconfig.h
329 cp $(buildd_static)/Makefile $(buildd_cross)/Makefile
330endif
331
258 touch stamps/stamp-configure-static332 touch stamps/stamp-configure-static
259333
260stamps/stamp-configure-debug: stamps/stamp-patch334stamps/stamp-configure-debug: stamps/stamp-patch
@@ -280,6 +354,12 @@
280 touch -r $(buildd_debug)/pyconfig.h $(buildd_debug)/pyconfig.h.new354 touch -r $(buildd_debug)/pyconfig.h $(buildd_debug)/pyconfig.h.new
281 mv -f $(buildd_debug)/pyconfig.h.new $(buildd_debug)/pyconfig.h355 mv -f $(buildd_debug)/pyconfig.h.new $(buildd_debug)/pyconfig.h
282356
357ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
358 @echo "Build python should use the new pyconfig.h"
359 cp $(buildd_debug)/pyconfig.h $(buildd_cross)/pyconfig.h
360 cp $(buildd_debug)/Makefile $(buildd_cross)/Makefile
361endif
362
283 touch stamps/stamp-configure-debug363 touch stamps/stamp-configure-debug
284364
285stamps/stamp-configure-shared-debug: stamps/stamp-patch365stamps/stamp-configure-shared-debug: stamps/stamp-patch
@@ -307,9 +387,16 @@
307 touch -r $(buildd_shdebug)/pyconfig.h $(buildd_shdebug)/pyconfig.h.new387 touch -r $(buildd_shdebug)/pyconfig.h $(buildd_shdebug)/pyconfig.h.new
308 mv -f $(buildd_shdebug)/pyconfig.h.new $(buildd_shdebug)/pyconfig.h388 mv -f $(buildd_shdebug)/pyconfig.h.new $(buildd_shdebug)/pyconfig.h
309389
390ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
391 @echo "Build python should use the new pyconfig.h"
392 cp $(buildd_shdebug)/pyconfig.h $(buildd_cross)/pyconfig.h
393 cp $(buildd_shdebug)/Makefile $(buildd_cross)/Makefile
394endif
395
310 touch stamps/stamp-configure-shared-debug396 touch stamps/stamp-configure-shared-debug
311397
312stamps/stamp-mincheck: stamps/stamp-build-static debian/PVER-minimal.README.Debian.in398stamps/stamp-mincheck: stamps/stamp-build-static debian/PVER-minimal.README.Debian.in
399ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
313 for m in $(MIN_MODS) $(MIN_PACKAGES) $(MIN_EXTS) $(MIN_BUILTINS); do \400 for m in $(MIN_MODS) $(MIN_PACKAGES) $(MIN_EXTS) $(MIN_BUILTINS); do \
314 echo "import $$m"; \401 echo "import $$m"; \
315 done > $(buildd_static)/minmods.py402 done > $(buildd_static)/minmods.py
@@ -323,6 +410,9 @@
323 else true; fi410 else true; fi
324 cd $(buildd_static) && ./python ../debian/mincheck.py \411 cd $(buildd_static) && ./python ../debian/mincheck.py \
325 minmods.py mindeps.txt412 minmods.py mindeps.txt
413else
414 @echo "No mincheck for cross build"
415endif
326 touch stamps/stamp-mincheck416 touch stamps/stamp-mincheck
327417
328TEST_RESOURCES = all418TEST_RESOURCES = all
@@ -419,6 +509,7 @@
419 touch stamps/stamp-check509 touch stamps/stamp-check
420510
421stamps/stamp-pystone:511stamps/stamp-pystone:
512ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
422 @echo "BEGIN pystone static"513 @echo "BEGIN pystone static"
423 cd $(buildd_static) && ./python ../Lib/test/pystone.py514 cd $(buildd_static) && ./python ../Lib/test/pystone.py
424 cd $(buildd_static) && ./python ../Lib/test/pystone.py515 cd $(buildd_static) && ./python ../Lib/test/pystone.py
@@ -433,6 +524,10 @@
433 cd $(buildd_debug) && ./python ../Lib/test/pystone.py524 cd $(buildd_debug) && ./python ../Lib/test/pystone.py
434 cd $(buildd_debug) && ./python ../Lib/test/pystone.py525 cd $(buildd_debug) && ./python ../Lib/test/pystone.py
435 @echo "END pystone debug"526 @echo "END pystone debug"
527else
528 @echo "No pystone for cross build"
529endif
530
436 touch stamps/stamp-pystone531 touch stamps/stamp-pystone
437532
438#ifeq (,$(filter $(DEB_HOST_ARCH), arm armel avr32 hppa mips mipsel m68k))533#ifeq (,$(filter $(DEB_HOST_ARCH), arm armel avr32 hppa mips mipsel m68k))
@@ -494,7 +589,7 @@
494589
495stamps/stamp-doc-html:590stamps/stamp-doc-html:
496 dh_testdir591 dh_testdir
497 $(MAKE) -C Doc html592 $(MAKE) -C Doc html $(CROSS)
498 touch stamps/stamp-doc-html593 touch stamps/stamp-doc-html
499594
500build-doc: stamps/stamp-patch stamps/stamp-build-doc595build-doc: stamps/stamp-patch stamps/stamp-build-doc
@@ -525,14 +620,17 @@
525clean: control-file620clean: control-file
526 dh_testdir621 dh_testdir
527 dh_testroot622 dh_testroot
528 $(MAKE) -f debian/rules unpatch623 $(MAKE) -f debian/rules unpatch $(CROSS)
529 rm -rf stamps .pc624 rm -rf stamps .pc
530 rm -f debian/test_results625 rm -f debian/test_results
531626
532 $(MAKE) -C Doc clean627 $(MAKE) -C Doc clean $(CROSS)
533 sed 's/^@/#/' Makefile.pre.in | $(MAKE) -f - srcdir=. distclean628 sed 's/^@/#/' Makefile.pre.in | $(MAKE) -f - srcdir=. distclean $(CROSS)
534 rm -rf Lib/test/db_home629 rm -rf Lib/test/db_home
535 rm -rf $(buildd_static) $(buildd_shared) $(buildd_debug) $(buildd_shdebug)630 rm -rf $(buildd_static) $(buildd_shared) $(buildd_debug) $(buildd_shdebug)
631ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
632 rm -rf $(buildd_cross)
633endif
536 find -name '*.py[co]' | xargs -r rm -f634 find -name '*.py[co]' | xargs -r rm -f
537 rm -f Lib/lib2to3/*.pickle635 rm -f Lib/lib2to3/*.pickle
538 rm -rf locales636 rm -rf locales
@@ -575,9 +673,9 @@
575 : # their packages' directories.673 : # their packages' directories.
576 install -d $(d)/usr674 install -d $(d)/usr
577ifeq ($(with_interp),static)675ifeq ($(with_interp),static)
578 $(MAKE) -C $(buildd_static) install prefix=$(CURDIR)/$(d)/usr676 $(MAKE) -C $(buildd_static) install prefix=$(CURDIR)/$(d)/usr $(CROSS)
579else677else
580 $(MAKE) -C $(buildd_shared) install prefix=$(CURDIR)/$(d)/usr678 $(MAKE) -C $(buildd_shared) install prefix=$(CURDIR)/$(d)/usr $(CROSS)
581endif679endif
582 -find $(d)/usr/lib/python$(VER) -name '*_failed*.so'680 -find $(d)/usr/lib/python$(VER) -name '*_failed*.so'
583 find $(d)/usr/lib/python$(VER) -name '*_failed*.so' | xargs -r rm -f681 find $(d)/usr/lib/python$(VER) -name '*_failed*.so' | xargs -r rm -f
@@ -815,8 +913,13 @@
815913
816 : # generate binfmt file914 : # generate binfmt file
817 mkdir -p $(d_min)/usr/share/binfmts915 mkdir -p $(d_min)/usr/share/binfmts
916ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
818 $(buildd_static)/python debian/mkbinfmt.py $(PVER) \917 $(buildd_static)/python debian/mkbinfmt.py $(PVER) \
819 > $(d_min)/usr/share/binfmts/$(PVER)918 > $(d_min)/usr/share/binfmts/$(PVER)
919else
920 $(buildd_cross)/python debian/mkbinfmt.py $(PVER) \
921 > $(d_min)/usr/share/binfmts/$(PVER)
922endif
820923
821 : # desktop entry924 : # desktop entry
822 mkdir -p $(d_base)/usr/share/applications925 mkdir -p $(d_base)/usr/share/applications
@@ -832,7 +935,7 @@
832935
833 : # install debug package936 : # install debug package
834 rm -rf $(d)-dbg937 rm -rf $(d)-dbg
835 $(MAKE) -C $(buildd_debug) install DESTDIR=$(CURDIR)/$(d)-dbg938 $(MAKE) -C $(buildd_debug) install DESTDIR=$(CURDIR)/$(d)-dbg $(CROSS)
836 dh_installdirs -p$(p_dbg) \939 dh_installdirs -p$(p_dbg) \
837 usr/bin \940 usr/bin \
838 usr/share/man/man1 \941 usr/share/man/man1 \

Subscribers

People subscribed via source and target branches

to all changes: