]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pylibfdt: Fix version normalization warning
authorMarek Vasut <marex@denx.de>
Thu, 15 Dec 2022 22:37:59 +0000 (23:37 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 22 Dec 2022 20:39:13 +0000 (15:39 -0500)
Fix the following version normalization warning:
"
/usr/lib/python3/dist-packages/setuptools/dist.py:530: UserWarning: Normalizing '2023.01' to '2023.1'
"

Using suggestion from Richard Jones:
https://github.com/pypa/setuptools/issues/308#issuecomment-405817468

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
scripts/dtc/pylibfdt/setup.py

index ec1fc5002b0dc4ab22e89d9514a0935037105dd4..9abdb57595adb6b10ef5ff503eaaa06e880af3d3 100755 (executable)
@@ -22,10 +22,14 @@ allows this script to be run stand-alone, e.g.:
 
 from setuptools import setup, Extension
 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: