Name: pyflakes Version: 2.0.0 Release: 8 Summary: A simple program which checks Python source files for errors License: MIT URL: https://github.com/PyCQA/pyflakes Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz Source1: http://mirrors.aliyun.com/ubuntu/ubuntu/pool/universe/p/pyflakes/pyflakes_1.6.0-1.debian.tar.xz Patch0001: %{name}-1.1.0-python3-man.patch BuildArch: noarch BuildRequires: python2-devel >= 2.7 python2-setuptools %description 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 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 Summary: A simple program which checks Python source files for errors BuildRequires: python3-devel python3-setuptools Requires: python3-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} %description -n python3-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 help Summary: help document and man info %description help Help document and man info for pyflakes package %prep %autosetup -a 1 -p1 %build %py2_build %py3_build %install %py3_install mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{python3_version} ln -s pyflakes-%{python3_version} %{buildroot}%{_bindir}/pyflakes-3 mkdir -p %{buildroot}%{_mandir}/man1 cp debian/pyflakes3.1 %{buildroot}%{_mandir}/man1/pyflakes-%{python3_version}.1 chmod 644 %{buildroot}%{_mandir}/man1/pyflakes-%{python3_version}.1 touch %{buildroot}%{_mandir}/man1/pyflakes-%{python3_version}.1 ln -s pyflakes-%{python3_version}.1 %{buildroot}%{_mandir}/man1/pyflakes-3.1 ln -s pyflakes-3 %{buildroot}%{_bindir}/python3-pyflakes 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 %{__python2} -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 %license LICENSE %{_bindir}/pyflakes-3* %{_bindir}/python3-pyflakes %{python3_sitelib}/pyflakes* %exclude %{python3_sitelib}/pyflakes/test/ %{_bindir}/pyflakes %files help %doc AUTHORS NEWS.txt README.rst %{_mandir}/man1/* %changelog * Fri Nov 15 2019 zhujunhao - 2.0.0-8 - package init