!4 remove python2

From: @zhangtao2020
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-10-31 11:03:18 +08:00 committed by Gitee
commit e42bfa0a93

View File

@ -1,6 +1,6 @@
Name: python-enchant
Version: 2.0.0
Release: 7
Release: 8
Summary: Cygwin python-enchant packaging
License: LGPLv2+
URL: https://github.com/cygwinports/python-enchant
@ -8,21 +8,12 @@ Source0: https://files.pythonhosted.org/packages/source/p/pyenchant/pyenchant-%{
BuildArch: noarch
BuildRequires: enchant-devel python2-devel python2-setuptools python2-nose
BuildRequires: enchant-devel
BuildRequires: python3-devel python3-setuptools python3-nose
%description
Cygwin python-enchant packaging.
%package -n python2-enchant
Summary: python2 package for enchant
Requires: enchant >= 1.5.0
Provides: PyEnchant
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-enchant
python2 package for enchant
%package -n python3-enchant
Summary: Cygwin python3-enchant packaging
Requires: enchant >= 1.5.0
@ -43,20 +34,11 @@ find %{_builddir}/python3-%{name}-%{version}-%{release} -name '*.py' | \
xargs sed -i '1s|^#!python|#!%{_bindir}/python3|'
%build
CFLAGS="$RPM_OPT_FLAGS" %py2_build
pushd %{_builddir}/python3-%{name}-%{version}-%{release}
CFLAGS="$RPM_OPT_FLAGS" %py3_build
popd
%install
%py2_install \
--single-version-externally-managed
rm -rf %{buildroot}/%{python2_sitelib}/%{srcname}/lib
rm -rf %{buildroot}/%{python2_sitelib}/%{srcname}/share
pushd %{_builddir}/python3-%{name}-%{version}-%{release}
%py3_install \
--single-version-externally-managed
@ -65,21 +47,10 @@ rm -rf %{buildroot}/%{python3_sitelib}/%{srcname}/share
popd
%check
pushd %{buildroot}/%{python2_sitelib}
LANG=en_US.UTF-8 /usr/bin/nosetests-2.*
popd
pushd %{buildroot}/%{python3_sitelib}
LANG=en_US.UTF-8 /usr/bin/nosetests-3.*
popd
%files -n python2-enchant
%defattr(-,root,root)
%license LICENSE.txt
%dir %{python2_sitelib}/enchant
%{python2_sitelib}/enchant
%{python2_sitelib}/pyenchant-%{version}-py?.?.egg-info
%files -n python3-enchant
%defattr(-,root,root)
%license LICENSE.txt
@ -92,6 +63,9 @@ popd
%doc README.txt TODO.txt
%changelog
* Thu Oct 22 2020 huanghaitao <huanghaitao8@huawei.com> - 2.0.0-8
- Disable python2 module
* Wed Jun 24 2020 zhanghua <zhanghua40@huawei.com> - 2.0.0-7
- Fix python3.8 complied error