Source: python3.7
Version: 3.7.2-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

python3.7 fails to cross build from source, because it tries importing
e.g. _decimal into the just build interpretetr. Such tests should be
conditional to DEB_BUILD_OPTIONS not containing nocheck. The attached
patch implements that and makes python3.7 cross buildable. Please
consider applying it.

Helmut
diff --minimal -Nru python3.7-3.7.2/debian/changelog 
python3.7-3.7.2/debian/changelog
--- python3.7-3.7.2/debian/changelog    2019-02-02 15:31:48.000000000 +0100
+++ python3.7-3.7.2/debian/changelog    2019-02-08 19:06:18.000000000 +0100
@@ -1,3 +1,10 @@
+python3.7 (3.7.2-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fully honour DEB_BUILD_OPTIONS=nocheck. Closes: #-1.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 08 Feb 2019 19:06:18 +0100
+
 python3.7 (3.7.2-2) unstable; urgency=medium
 
   * Update to 20190202 from the 3.7 branch.
diff --minimal -Nru python3.7-3.7.2/debian/rules python3.7-3.7.2/debian/rules
--- python3.7-3.7.2/debian/rules        2018-12-12 17:34:58.000000000 +0100
+++ python3.7-3.7.2/debian/rules        2019-02-08 19:06:07.000000000 +0100
@@ -305,7 +305,7 @@
                PROFILE_TASK='$(PROFILE_TASK)' $(make_build_target)
 
        : # check that things are correctly built
-ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ifneq ($(WITHOUT_CHECK),yes)
   ifneq (,$(filter $(DEB_HOST_ARCH_OS), linux))
        cd $(buildd_static) && ./python -c 'from _multiprocessing import 
SemLock'
   endif
@@ -334,8 +334,10 @@
        $(MAKE) $(NJOBS) -C $(buildd_debug) \
                EXTRA_CFLAGS="$(DEBUG_CFLAGS)"
 
+ifneq ($(WITHOUT_CHECK),yes)
        cd $(buildd_static) && ./python -c 'import _decimal'
        cd $(buildd_debug) && ./python -c 'import math, cmath'
+endif
 
        touch stamps/stamp-build-debug
 

Reply via email to