compatible with python3 compile environment

This commit is contained in:
h00465007 2020-02-29 14:09:02 +08:00
parent 57c25a56e3
commit 436e594b39

View File

@ -1,6 +1,6 @@
Name: uboot-tools Name: uboot-tools
Version: 2018.09 Version: 2018.09
Release: 6 Release: 7
Summary: tools for U-Boot Summary: tools for U-Boot
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot URL: http://www.denx.de/wiki/U-Boot
@ -22,6 +22,8 @@ Patch0008: sunxi-DT-A64-add-Pine64-LTS-support.patch
BuildRequires: bc dtc gcc make flex bison git-core openssl-devel BuildRequires: bc dtc gcc make flex bison git-core openssl-devel
BuildRequires: python-unversioned-command python2-devel python2-setuptools BuildRequires: python-unversioned-command python2-devel python2-setuptools
BuildRequires: python2-libfdt python2-pyelftools SDL-devel swig BuildRequires: python2-libfdt python2-pyelftools SDL-devel swig
# this required when /usr/bin/python link to python3
BuildRequires: python3-devel
%ifarch %{arm} aarch64 %ifarch %{arm} aarch64
BuildRequires: vboot-utils BuildRequires: vboot-utils
%endif %endif
@ -85,6 +87,9 @@ rm -rf .git
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 . cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 .
# use python2 shebang explicitly
find . -name "*.py" -exec sed -i -r 's!/usr/bin/python(\s|$)!/usr/bin/python2\1!' {} \;
%build %build
mkdir builds mkdir builds
@ -283,6 +288,12 @@ cp -p board/warp7/README builds/docs/README.warp7
%{_mandir}/man1/mkimage.1.gz %{_mandir}/man1/mkimage.1.gz
%changelog %changelog
* Sat Feb 29 2020 hexiujun <hexiujun1@huawei.com> - 2018.09-7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: compatible with python3 compile environment
* Fri Jan 17 2020 Tianfei <tianfei16@huawei.com> - 2018.09-6 * Fri Jan 17 2020 Tianfei <tianfei16@huawei.com> - 2018.09-6
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA