!8 delete python2 dependency

From: @weiwei_150212
Reviewed-by: @hanxinke
Signed-off-by: @hanxinke
This commit is contained in:
openeuler-ci-bot 2020-11-02 16:47:33 +08:00 committed by Gitee
commit 7cd676a7e7

View File

@ -1,7 +1,7 @@
Name: python-pycparser Name: python-pycparser
Summary: A parser for the C language Summary: A parser for the C language
Version: 2.20 Version: 2.20
Release: 2 Release: 3
License: BSD License: BSD
URL: http://github.com/eliben/pycparser URL: http://github.com/eliben/pycparser
Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
@ -13,9 +13,9 @@ Patch1: pycparser-2.10-ply.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-setuptools python2-pycparser python-unversioned-command BuildRequires: python3-pycparser python3-unversioned-command
# for unit tests # for unit tests
BuildRequires: dos2unix python2-ply >= 3.6 python3-devel python3-setuptools python3-ply BuildRequires: dos2unix python3-devel python3-setuptools python3-ply
%description %description
pycparser is a parser for the C language, written in pure Python. pycparser is a parser for the C language, written in pure Python.
@ -29,17 +29,6 @@ Requires: %{name} = %{version}-%{release}
%description devel %description devel
This package contains development files for %{name} This package contains development files for %{name}
%package -n python2-pycparser
Summary: A parser for the C language
Group: System Environment/Libraries
Requires: python2-ply >= 3.6
%{?python_provide:%python_provide python2-pycparser}
%description -n python2-pycparser
pycparser is a parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications
that need to parse C source code.
This package is for Python2.
%package -n python3-pycparser %package -n python3-pycparser
Summary: A parser for the C language Summary: A parser for the C language
Group: System Environment/Libraries Group: System Environment/Libraries
@ -55,38 +44,25 @@ This package is for Python3.
%autosetup -n pycparser-release_v%{version} -p1 %autosetup -n pycparser-release_v%{version} -p1
# remove embedded copy of ply # remove embedded copy of ply
rm -rf pycparser/ply rm -rf pycparser/ply
%{__python2} %{SOURCE1} examples %{__python3} %{SOURCE1} examples
dos2unix LICENSE dos2unix LICENSE
%build %build
%py2_build
pushd build/lib/pycparser
%{__python2} _build_tables.py
popd
%py3_build %py3_build
pushd build/lib/pycparser pushd build/lib/pycparser
%{__python3} _build_tables.py %{__python3} _build_tables.py
popd popd
%install %install
%py2_install
%py3_install %py3_install
%check %check
%{__python2} tests/all_tests.py
%{__python3} tests/all_tests.py %{__python3} tests/all_tests.py
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc examples %doc examples
%files -n python2-pycparser
%defattr(-,root,root)
%license LICENSE
%{python_sitelib}/pycparser/
%{python_sitelib}/pycparser-*.egg-info
%files -n python3-pycparser %files -n python3-pycparser
%defattr(-,root,root) %defattr(-,root,root)
%license LICENSE %license LICENSE
@ -94,6 +70,9 @@ popd
%{python3_sitelib}/pycparser-*.egg-info %{python3_sitelib}/pycparser-*.egg-info
%changelog %changelog
* Fri Oct 30 2020 tianwei<tianwei12@huawei.com> - 2.20-3
- remove python2
* Sat Sep 5 2020 shixuantong<shixuantong@huawei.com> - 2.20-2 * Sat Sep 5 2020 shixuantong<shixuantong@huawei.com> - 2.20-2
- update source0 and change tar package name - update source0 and change tar package name