Remove python2-isort subpackage

This commit is contained in:
lingsheng 2020-08-05 14:34:19 +08:00
parent 10bd60265b
commit 08929f48d6

View File

@ -1,6 +1,6 @@
Name: python-isort Name: python-isort
Version: 4.3.4 Version: 4.3.4
Release: 6 Release: 7
Summary: A Python utility / library to sort imports Summary: A Python utility / library to sort imports
License: MIT License: MIT
@ -11,16 +11,6 @@ BuildArch: noarch
%description %description
Isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type. Isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.
%package -n python2-isort
Summary: A Python utility / library to sort imports
%{?python_provide:%python_provide python2-isort}
BuildRequires: python2-devel python2-setuptools python2-mock python2-pytest python2-futures
Requires: python2-futures
%description -n python2-isort
Isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.
Python 2 version.
%package -n python3-isort %package -n python3-isort
Summary: A Python utility / library to sort imports Summary: A Python utility / library to sort imports
%{?python_provide:%python_provide python3-isort} %{?python_provide:%python_provide python3-isort}
@ -36,39 +26,28 @@ Python 3 version.
sed -i -e '1{\@^#!.*@d}' isort/main.py sed -i -e '1{\@^#!.*@d}' isort/main.py
%build %build
%py2_build
%py3_build %py3_build
%install %install
%py2_install
mv %{buildroot}%{_bindir}/isort{,-%{python2_version}}
ln -s isort-%{python2_version} %{buildroot}%{_bindir}/isort-2
%py3_install %py3_install
mv %{buildroot}%{_bindir}/isort{,-%{python3_version}} mv %{buildroot}%{_bindir}/isort{,-%{python3_version}}
ln -s isort-%{python3_version} %{buildroot}%{_bindir}/isort-3 ln -s isort-%{python3_version} %{buildroot}%{_bindir}/isort-3
ln -s isort-2 %{buildroot}%{_bindir}/isort ln -s isort-3 %{buildroot}%{_bindir}/isort
%check %check
%{__python2} setup.py test
%{__python3} setup.py test %{__python3} setup.py test
%files -n python2-isort
%doc README.rst *.md LICENSE
%{_bindir}/isort
%{_bindir}/isort-2
%{_bindir}/isort-%{python2_version}
%{python2_sitelib}/isort/
%{python2_sitelib}/isort-*.egg-info/
%files -n python3-isort %files -n python3-isort
%doc README.rst *.md LICENSE %doc README.rst *.md LICENSE
%{_bindir}/isort
%{_bindir}/isort-3 %{_bindir}/isort-3
%{_bindir}/isort-%{python3_version} %{_bindir}/isort-%{python3_version}
%{python3_sitelib}/isort/ %{python3_sitelib}/isort/
%{python3_sitelib}/isort-*.egg-info/ %{python3_sitelib}/isort-*.egg-info/
%changelog %changelog
* Wed Aug 05 2020 lingsheng <lingsheng@huawei.com> - 4.3.4-7
- Remove python2-isort subpackage
* Mon Feb 24 2020 Senlin Xia <xiasenlin1@huawei.com> - 4.3.4-6 * Mon Feb 24 2020 Senlin Xia <xiasenlin1@huawei.com> - 4.3.4-6
- Package init - Package init