disable python2

This commit is contained in:
jackie_wu 2020-11-02 09:53:13 +08:00
parent 9ef0855855
commit 0581305331

View File

@ -1,6 +1,6 @@
Name: pyflakes Name: pyflakes
Version: 2.1.0 Version: 2.1.0
Release: 1 Release: 2
Summary: A simple program which checks Python source files for errors Summary: A simple program which checks Python source files for errors
License: MIT License: MIT
URL: https://github.com/PyCQA/pyflakes URL: https://github.com/PyCQA/pyflakes
@ -8,25 +8,12 @@ Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}
Source1: http://cdn.debian.net/debian/pool/main/p/pyflakes/pyflakes_2.0.0-1.debian.tar.xz Source1: http://cdn.debian.net/debian/pool/main/p/pyflakes/pyflakes_2.0.0-1.debian.tar.xz
Patch0001: %{name}-1.1.0-python3-man.patch Patch0001: %{name}-1.1.0-python3-man.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel >= 2.7 python2-setuptools
%description %description
This is a safe program which analyze programs and detects various errors.\ This is a safe program which analyze programs and detects various errors.\
It works by parsing the source file and check for error.\ It works by parsing the source file and check for error.\
it's also much faster. it's also much faster.
%package -n python2-pyflakes
Summary: A simple program which checks Python source files for errors
Requires: python2-setuptools
%{?python_provide:%python_provide python2-pyflakes}
Provides: pyflakes = %{version}-%{release}
Obsoletes: pyflakes < %{version}-%{release}
%description -n python2-pyflakes
This is a safe program which analyze programs and detects various errors.\
It works by parsing the source file and check for error.\
it's also much faster.
%package -n python3-pyflakes %package -n python3-pyflakes
Summary: A simple program which checks Python source files for errors Summary: A simple program which checks Python source files for errors
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
@ -47,7 +34,6 @@ Help document and man info for pyflakes package
%autosetup -a 1 -p1 %autosetup -a 1 -p1
%build %build
%py2_build
%py3_build %py3_build
%install %install
@ -63,34 +49,16 @@ ln -s pyflakes-%{python3_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-3.1
ln -s pyflakes-3 %{buildroot}%{_bindir}/python3-pyflakes ln -s pyflakes-3 %{buildroot}%{_bindir}/python3-pyflakes
ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/python3-pyflakes.1 ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/python3-pyflakes.1
%py2_install
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python2_version}
ln -s pyflakes-%{python2_version} %{buildroot}%{_bindir}/pyflakes-2
mkdir -p %{buildroot}%{_mandir}/man1
cp debian/pyflakes.1 %{buildroot}%{_mandir}/man1/pyflakes-%{python2_version}.1
chmod 644 %{buildroot}%{_mandir}/man1/pyflakes-%{python2_version}.1
touch %{buildroot}%{_mandir}/man1/pyflakes-%{python2_version}.1
ln -s pyflakes-%{python2_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-2.1
ln -s pyflakes-3 %{buildroot}%{_bindir}/pyflakes
ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/pyflakes.1
%check %check
%{__python2} -Wall setup.py test
%{__python3} -Wall setup.py test %{__python3} -Wall setup.py test
%files -n python2-pyflakes
%license LICENSE
%{_bindir}/pyflakes-2*
%{python2_sitelib}/pyflakes*
%exclude %{python2_sitelib}/pyflakes/test/
%files -n python3-pyflakes %files -n python3-pyflakes
%license LICENSE %license LICENSE
%{_bindir}/pyflakes-3* %{_bindir}/pyflakes-3*
%{_bindir}/python3-pyflakes %{_bindir}/python3-pyflakes
%{python3_sitelib}/pyflakes* %{python3_sitelib}/pyflakes*
%exclude %{python3_sitelib}/pyflakes/test/ %exclude %{python3_sitelib}/pyflakes/test/
%{_bindir}/pyflakes #%{_bindir}/pyflakes
%files help %files help
%doc AUTHORS README.rst NEWS.rst %doc AUTHORS README.rst NEWS.rst
@ -98,6 +66,9 @@ ln -s pyflakes-3.1 %{buildroot}%{_mandir}/man1/pyflakes.1
%changelog %changelog
* Wed Oct 21 2020 wutao <wutao61@huawei.com> - 2.1.0-2
- delete python2 modules
* Tue Jun 23 2020 yanan li <liyanan032@huawei.com> - 2.1.0-1 * Tue Jun 23 2020 yanan li <liyanan032@huawei.com> - 2.1.0-1
- Package update - Package update