Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EED67C4332F for ; Wed, 4 Jan 2023 14:44:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D0BDF85527; Wed, 4 Jan 2023 15:44:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=pschenker.ch Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=pschenker.ch header.i=@pschenker.ch header.b="idw032ZA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7739785527; Wed, 4 Jan 2023 15:44:11 +0100 (CET) Received: from smtp-190c.mail.infomaniak.ch (smtp-190c.mail.infomaniak.ch [185.125.25.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2566F8551E for ; Wed, 4 Jan 2023 15:44:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=pschenker.ch Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dev@pschenker.ch Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4NnC6H5GwGzMqkSm; Wed, 4 Jan 2023 15:44:07 +0100 (CET) Received: from unknown by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4NnC6H1Y9kzMppn5; Wed, 4 Jan 2023 15:44:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1672843447; bh=Om9iDlnu8fdzZDtfzXwZbZER+D106uPH3pdOn0EiX6E=; h=From:To:Cc:Subject:Date:From; b=idw032ZAM9kAEnCpumw4WrCGzIM338GMQ0xJNg14W0CudWIGWu1EbQDSmZCt+BQK4 t+Sy4pTWXwVJQdhGkw4zyShAuTyVPV7Vie3R54ybGCtgEe4OQfimc0CJkRU3QB0Wb3 oDTeOOozx4TddQZ5lNceOqJ0BkF4kBzyQYamcx/c= From: Philippe Schenker To: Simon Glass , u-boot@lists.denx.de Cc: Marek Vasut , Philippe Schenker Subject: [PATCH] pylibfdt: Fix disable version normalization Date: Wed, 4 Jan 2023 15:43:33 +0100 Message-Id: <20230104144333.77232-1-dev@pschenker.ch> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Philippe Schenker On Arch Linux based systems python setuptools does not contain "setuptools.extern" hence it is failing with the following error-message: " ModuleNotFoundError: No module named 'setuptools.extern' " According to a eschwartz `setuptools.extern` is not a public API and shall not be assumed to be present in the setuptools package. He mentions that the setuptools project anyway wants to drop this. [1] Use the correct solution introduced by python setuptools developers to disable normalization. [2] [1] https://bbs.archlinux.org/viewtopic.php?id=259608 [2] https://github.com/pypa/setuptools/pull/2026 Fixes: 440098c42e73 ("pylibfdt: Fix version normalization warning") Signed-off-by: Philippe Schenker --- scripts/dtc/pylibfdt/setup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py index 9abdb57595ad..c07f65e6bcaf 100755 --- a/scripts/dtc/pylibfdt/setup.py +++ b/scripts/dtc/pylibfdt/setup.py @@ -20,16 +20,12 @@ allows this script to be run stand-alone, e.g.: ./pylibfdt/setup.py install [--prefix=...] """ -from setuptools import setup, Extension +from setuptools import setup, Extension, sic from setuptools.command.build_py import build_py as _build_py -from setuptools.extern.packaging import version import os import re import sys -# Disable version normalization -version.Version = version.LegacyVersion - srcdir = os.path.dirname(__file__) with open(os.path.join(srcdir, "../README"), "r") as fh: @@ -141,7 +137,7 @@ class build_py(_build_py): setup( name='libfdt', - version=version, + version=sic(version), cmdclass = {'build_py' : build_py}, author='Simon Glass', author_email='sjg@chromium.org', -- 2.39.0