mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
pylibfdt: Fix disable version normalization
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: 440098c42e
("pylibfdt: Fix version normalization warning")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
519e6641db
commit
1416591876
1 changed files with 2 additions and 6 deletions
|
@ -20,16 +20,12 @@ allows this script to be run stand-alone, e.g.:
|
||||||
./pylibfdt/setup.py install [--prefix=...]
|
./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.command.build_py import build_py as _build_py
|
||||||
from setuptools.extern.packaging import version
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Disable version normalization
|
|
||||||
version.Version = version.LegacyVersion
|
|
||||||
|
|
||||||
srcdir = os.path.dirname(__file__)
|
srcdir = os.path.dirname(__file__)
|
||||||
|
|
||||||
with open(os.path.join(srcdir, "../README"), "r") as fh:
|
with open(os.path.join(srcdir, "../README"), "r") as fh:
|
||||||
|
@ -141,7 +137,7 @@ class build_py(_build_py):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='libfdt',
|
name='libfdt',
|
||||||
version=version,
|
version=sic(version),
|
||||||
cmdclass = {'build_py' : build_py},
|
cmdclass = {'build_py' : build_py},
|
||||||
author='Simon Glass',
|
author='Simon Glass',
|
||||||
author_email='sjg@chromium.org',
|
author_email='sjg@chromium.org',
|
||||||
|
|
Loading…
Reference in a new issue