From patchwork Sun Jul 3 00:37:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 643656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rhrqH3MNVz9t0h for ; Sun, 3 Jul 2016 10:38:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 819DE8957A; Sun, 3 Jul 2016 00:38:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N9frrSKkz59d; Sun, 3 Jul 2016 00:38:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A619F89434; Sun, 3 Jul 2016 00:38:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 325D61CEA5A for ; Sun, 3 Jul 2016 00:38:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2CD2688A66 for ; Sun, 3 Jul 2016 00:38:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mQd8r7kE9Ufw for ; Sun, 3 Jul 2016 00:38:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4A34787E06 for ; Sun, 3 Jul 2016 00:38:21 +0000 (UTC) Received: from vandecaa-laptop.fritz.box (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Sun, 3 Jul 2016 02:37:25 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Sun, 3 Jul 2016 02:37:23 +0200 Message-ID: <1467506243-18432-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH] xcb-proto: add upstream patch for python3.5 build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since we run compileall on all python files in TARGET_DIR as part of the finalization, the align.py from xcb-proto will be compiled (it is not compiled as part of the package build). This file contains mixed tab-spaces indentation, which python 3.5 no longer allows. Add an upstream patch that cleans up the indentation in this file. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .../0001-Make-whitespace-use-consistent.patch | 212 +++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 package/x11r7/xcb-proto/0001-Make-whitespace-use-consistent.patch diff --git a/package/x11r7/xcb-proto/0001-Make-whitespace-use-consistent.patch b/package/x11r7/xcb-proto/0001-Make-whitespace-use-consistent.patch new file mode 100644 index 0000000..67adada --- /dev/null +++ b/package/x11r7/xcb-proto/0001-Make-whitespace-use-consistent.patch @@ -0,0 +1,212 @@ +From ea7a3ac6c658164690e0febb55f4467cb9e0bcac Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Thu, 19 May 2016 17:30:04 +0200 +Subject: [PATCH] Make whitespace use consistent. + +At least python-3.5.x complains about this forcefully. + +Signed-off-by: Thomas Klausner +Signed-off-by: Uli Schlachter +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + xcbgen/align.py | 96 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 48 insertions(+), 48 deletions(-) + +diff --git a/xcbgen/align.py b/xcbgen/align.py +index 5e31838..d4c12ee 100644 +--- a/xcbgen/align.py ++++ b/xcbgen/align.py +@@ -16,12 +16,12 @@ class Alignment(object): + return self.align == other.align and self.offset == other.offset + + def __str__(self): +- return "(align=%d, offset=%d)" % (self.align, self.offset) ++ return "(align=%d, offset=%d)" % (self.align, self.offset) + + @staticmethod + def for_primitive_type(size): +- # compute the required start_alignment based on the size of the type +- if size % 8 == 0: ++ # compute the required start_alignment based on the size of the type ++ if size % 8 == 0: + # do 8-byte primitives require 8-byte alignment in X11? + return Alignment(8,0) + elif size % 4 == 0: +@@ -33,7 +33,7 @@ class Alignment(object): + + + def align_after_fixed_size(self, size): +- new_offset = (self.offset + size) % self.align ++ new_offset = (self.offset + size) % self.align + return Alignment(self.align, new_offset) + + +@@ -41,7 +41,7 @@ class Alignment(object): + ''' + Assuming the given external_align, checks whether + self is fulfilled for all cases. +- Returns True if yes, False otherwise. ++ Returns True if yes, False otherwise. + ''' + if self.align == 1 and self.offset == 0: + # alignment 1 with offset 0 is always fulfilled +@@ -55,9 +55,9 @@ class Alignment(object): + # the external align guarantees less alignment -> not guaranteed + return False + +- if external_align.align % self.align != 0: ++ if external_align.align % self.align != 0: + # the external align cannot be divided by our align +- # -> not guaranteed ++ # -> not guaranteed + # (this can only happen if there are alignments that are not + # a power of 2, which is highly discouraged. But better be + # safe and check for it) +@@ -72,7 +72,7 @@ class Alignment(object): + + def combine_with(self, other): + # returns the alignment that is guaranteed when +- # both, self or other, can happen ++ # both, self or other, can happen + new_align = gcd(self.align, other.align) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align +@@ -83,8 +83,8 @@ class Alignment(object): + new_align = gcd(new_align, offset_diff) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align +- assert new_offset_candidate1 == new_offset_candidate2 +- new_offset = new_offset_candidate1 ++ assert new_offset_candidate1 == new_offset_candidate2 ++ new_offset = new_offset_candidate1 + # return the result + return Alignment(new_align, new_offset) + +@@ -92,44 +92,44 @@ class Alignment(object): + class AlignmentLog(object): + + def __init__(self): +- self.ok_list = [] +- self.fail_list = [] +- self.verbosity = 1 ++ self.ok_list = [] ++ self.fail_list = [] ++ self.verbosity = 1 + + def __str__(self): +- result = "" ++ result = "" + +- # output the OK-list +- for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list: +- stacksize = len(callstack) ++ # output the OK-list ++ for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list: ++ stacksize = len(callstack) + indent = ' ' * stacksize +- if self.ok_callstack_is_relevant(callstack): ++ if self.ok_callstack_is_relevant(callstack): + if field_name is None or field_name == "": +- result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n" +- % (indent, str(type_obj), indent, str(align_before), str(align_after))) +- else: +- result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n" +- % (indent, str(field_name), str(type_obj), +- indent, str(align_before), str(align_after))) ++ result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n" ++ % (indent, str(type_obj), indent, str(align_before), str(align_after))) ++ else: ++ result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n" ++ % (indent, str(field_name), str(type_obj), ++ indent, str(align_before), str(align_after))) + if self.verbosity >= 1: +- result += self.callstack_to_str(indent, callstack) ++ result += self.callstack_to_str(indent, callstack) + +- # output the fail-list +- for (align_before, field_name, type_obj, callstack, reason) in self.fail_list: +- stacksize = len(callstack) ++ # output the fail-list ++ for (align_before, field_name, type_obj, callstack, reason) in self.fail_list: ++ stacksize = len(callstack) + indent = ' ' * stacksize +- if field_name is None or field_name == "": +- result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n" +- % (indent, str(align_before), indent, str(type_obj), indent, reason)) +- else: +- result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n" +- % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason)) ++ if field_name is None or field_name == "": ++ result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n" ++ % (indent, str(align_before), indent, str(type_obj), indent, reason)) ++ else: ++ result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n" ++ % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason)) + + if self.verbosity >= 1: +- result += self.callstack_to_str(indent, callstack) ++ result += self.callstack_to_str(indent, callstack) + + +- return result ++ return result + + + def callstack_to_str(self, indent, callstack): +@@ -137,41 +137,41 @@ class AlignmentLog(object): + for stack_elem in callstack: + result += "\t %s%s\n" % (indent, str(stack_elem)) + result += "\t%s]\n" % indent +- return result ++ return result + + + def ok_callstack_is_relevant(self, ok_callstack): + # determine whether an ok callstack is relevant for logging +- if self.verbosity >= 2: +- return True ++ if self.verbosity >= 2: ++ return True + + # empty callstacks are always relevant +- if len(ok_callstack) == 0: ++ if len(ok_callstack) == 0: + return True + +- # check whether the ok_callstack is a subset or equal to a fail_callstack ++ # check whether the ok_callstack is a subset or equal to a fail_callstack + for (align_before, field_name, type_obj, fail_callstack, reason) in self.fail_list: + if len(ok_callstack) <= len(fail_callstack): + zipped = zip(ok_callstack, fail_callstack[:len(ok_callstack)]) +- is_subset = all([i == j for i, j in zipped]) +- if is_subset: ++ is_subset = all([i == j for i, j in zipped]) ++ if is_subset: + return True + + return False + + + def ok(self, align_before, field_name, type_obj, callstack, align_after): +- self.ok_list.append((align_before, field_name, type_obj, callstack, align_after)) ++ self.ok_list.append((align_before, field_name, type_obj, callstack, align_after)) + + def fail(self, align_before, field_name, type_obj, callstack, reason): +- self.fail_list.append((align_before, field_name, type_obj, callstack, reason)) ++ self.fail_list.append((align_before, field_name, type_obj, callstack, reason)) + + def append(self, other): +- self.ok_list.extend(other.ok_list) +- self.fail_list.extend(other.fail_list) ++ self.ok_list.extend(other.ok_list) ++ self.fail_list.extend(other.fail_list) + + def ok_count(self): +- return len(self.ok_list) ++ return len(self.ok_list) + + + +-- +2.8.1 +