From patchwork Tue Jan 15 17:15:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1025335 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.b="Ld92XNmO"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fHHM1JyGz9sDT for ; Wed, 16 Jan 2019 04:23:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 95B4F861D5; Tue, 15 Jan 2019 17:23:24 +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 sg9UM0PjLF93; Tue, 15 Jan 2019 17:23:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 822928616F; Tue, 15 Jan 2019 17:23:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D9DB71BF27E for ; Tue, 15 Jan 2019 17:23:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D49118616F for ; Tue, 15 Jan 2019 17:23:21 +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 AN6HR6L+wMBy for ; Tue, 15 Jan 2019 17:23:20 +0000 (UTC) X-Greylist: delayed 00:06:43 by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id F183A8609C for ; Tue, 15 Jan 2019 17:23:19 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id y8so4039337wmi.4 for ; Tue, 15 Jan 2019 09:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=j9/Cb3PegG53U69tZMTKEPqMbYrbM806caiaZtacAHw=; b=Ld92XNmOgqJ1lL2+PHuVLErHOAKqEgz7V/iMxktvQWYuZKC+MAjTzOV79aW4U+HzPj 9fQ25fRdDjkRr7/vzDVnqmeJlXxSjFqx+AgHPaXDTnZxpAUkRbND4oRDt6rEDrErNo3p v1Jhx+++c9rQ4UfnPMVKOnppoTrvIKiR6AVmIAMq6gfwEAdsK0X2I+4tCpBxAWf9qm/a 79t3ubi6nPsjX4K9R7H1JGGvYUHz+BvQFCFomzRn7jaKuF/sXZYuV8t7XxoOHGVQ3j+R F00Q8Mt30nFx/zxtYcKtCiMmEK6zYwQA6HQ5DEr0Ur0AkzZxhUWzx5nMkV19/Sf9VY/I lJlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=j9/Cb3PegG53U69tZMTKEPqMbYrbM806caiaZtacAHw=; b=fPejVQZqhu+BTuTbPMzvC3zikcF4Nnd9MABhDVpusy703A+a9Xs8IJwDPtBDsxygVM jkST93DpHvWaP+/WvYhFJrRgTur+5kNU6NyjRgoS43n0QEAXxGkuJKMrKLa6N3hbgE2A DD4ZIN3siatf89RJ6c0fki9368Wvv4DQQxyyGkhCo2WDeVwM+WbdDaMMDwxvBTAUyxNZ OtEqjTSiTQPajDE7pXFgzzxe73TPXtzwI3gbeglvF2sdmr4A1ovRlVla8PwWVqaZX7y5 Dl9u+yYxRiT5DkYJRk8gSbfEAnLCdajU6pWP5+viLHvwPeyPOnkXuEslwWcoL56CZDAm haWg== X-Gm-Message-State: AJcUukc+aFinG5AvzHwzqoPR4pB7tQK7Mh6Uadcea4LQRvkNgxXbY14G 7Ga25IDa6CkdCTec2+YbOM6g5/5bH22KPg== X-Google-Smtp-Source: ALg8bN4gTI4mpG6HPpL6OsDyrtxxaBl8Xlhd4EnaNgW3P9R5pDextHaevACvu2sD/M3fKQ3c/n4aXA== X-Received: by 2002:a1c:c87:: with SMTP id 129mr3989252wmm.116.1547572594520; Tue, 15 Jan 2019 09:16:34 -0800 (PST) Received: from localhost.localdomain ([91.183.118.145]) by smtp.gmail.com with ESMTPSA id a6sm29169362wmh.10.2019.01.15.09.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 09:16:33 -0800 (PST) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 15 Jan 2019 18:15:45 +0100 Message-Id: <20190115171545.8337-1-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] utils/check-package: use explicit relative imports X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The syntax for explicit relative imports was introduced in Python2.6, and the implicit relative imports were removed in Python3. According to PEP394, Python source files that use the `python` shebang line should be compatible with both Python2 and Python3. With this patch, users of distros where Python3 is the default are able to use check-package Signed-off-by: Titouan Christophe --- utils/checkpackagelib/lib.py | 2 +- utils/checkpackagelib/lib_config.py | 10 +++++----- utils/checkpackagelib/lib_hash.py | 10 +++++----- utils/checkpackagelib/lib_mk.py | 10 +++++----- utils/checkpackagelib/lib_patch.py | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/utils/checkpackagelib/lib.py b/utils/checkpackagelib/lib.py index 91f4ad49b7..06b147a470 100644 --- a/utils/checkpackagelib/lib.py +++ b/utils/checkpackagelib/lib.py @@ -1,6 +1,6 @@ # See utils/checkpackagelib/readme.txt before editing this file. -from base import _CheckFunction +from .base import _CheckFunction class ConsecutiveEmptyLines(_CheckFunction): diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 1d273f1c5f..f6dc583a08 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -5,11 +5,11 @@ import re -from base import _CheckFunction -from lib import ConsecutiveEmptyLines # noqa: F401 -from lib import EmptyLastLine # noqa: F401 -from lib import NewlineAtEof # noqa: F401 -from lib import TrailingSpace # noqa: F401 +from .base import _CheckFunction +from .lib import ConsecutiveEmptyLines # noqa: F401 +from .lib import EmptyLastLine # noqa: F401 +from .lib import NewlineAtEof # noqa: F401 +from .lib import TrailingSpace # noqa: F401 def _empty_or_comment(text): diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py index 6d4cc9fd62..3ddd88bae9 100644 --- a/utils/checkpackagelib/lib_hash.py +++ b/utils/checkpackagelib/lib_hash.py @@ -5,11 +5,11 @@ import re -from base import _CheckFunction -from lib import ConsecutiveEmptyLines # noqa: F401 -from lib import EmptyLastLine # noqa: F401 -from lib import NewlineAtEof # noqa: F401 -from lib import TrailingSpace # noqa: F401 +from .base import _CheckFunction +from .lib import ConsecutiveEmptyLines # noqa: F401 +from .lib import EmptyLastLine # noqa: F401 +from .lib import NewlineAtEof # noqa: F401 +from .lib import TrailingSpace # noqa: F401 def _empty_line_or_comment(text): diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py index 0e430a2f12..857d7b16ad 100644 --- a/utils/checkpackagelib/lib_mk.py +++ b/utils/checkpackagelib/lib_mk.py @@ -6,11 +6,11 @@ import re -from base import _CheckFunction -from lib import ConsecutiveEmptyLines # noqa: F401 -from lib import EmptyLastLine # noqa: F401 -from lib import NewlineAtEof # noqa: F401 -from lib import TrailingSpace # noqa: F401 +from .base import _CheckFunction +from .lib import ConsecutiveEmptyLines # noqa: F401 +from .lib import EmptyLastLine # noqa: F401 +from .lib import NewlineAtEof # noqa: F401 +from .lib import TrailingSpace # noqa: F401 class Indent(_CheckFunction): diff --git a/utils/checkpackagelib/lib_patch.py b/utils/checkpackagelib/lib_patch.py index 555621afa1..4b1b48e6ca 100644 --- a/utils/checkpackagelib/lib_patch.py +++ b/utils/checkpackagelib/lib_patch.py @@ -5,8 +5,8 @@ import re -from base import _CheckFunction -from lib import NewlineAtEof # noqa: F401 +from .base import _CheckFunction +from .lib import NewlineAtEof # noqa: F401 class ApplyOrder(_CheckFunction):