diff --git a/isort-4.3.4.tar.gz b/isort-4.3.4.tar.gz new file mode 100644 index 0000000..2c5ac54 Binary files /dev/null and b/isort-4.3.4.tar.gz differ diff --git a/python-isort.spec b/python-isort.spec new file mode 100644 index 0000000..165e359 --- /dev/null +++ b/python-isort.spec @@ -0,0 +1,76 @@ +Name: python-isort +Version: 4.3.4 +Release: 6 +Summary: A Python utility / library to sort imports + +License: MIT +URL: https://github.com/timothycrosley/isort +Source0: %{url}/archive/%{version}/isort-%{version}.tar.gz +BuildArch: noarch + +%description +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 +Summary: A Python utility / library to sort imports +%{?python_provide:%python_provide python3-isort} +BuildRequires: python3-devel python3-setuptools +BuildRequires: python3-mock python3-pytest + +%description -n python3-isort +Isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type. +Python 3 version. + +%prep +%autosetup -n isort-%{version} +sed -i -e '1{\@^#!.*@d}' isort/main.py + +%build +%py2_build +%py3_build + +%install +%py2_install +mv %{buildroot}%{_bindir}/isort{,-%{python2_version}} +ln -s isort-%{python2_version} %{buildroot}%{_bindir}/isort-2 + +%py3_install +mv %{buildroot}%{_bindir}/isort{,-%{python3_version}} +ln -s isort-%{python3_version} %{buildroot}%{_bindir}/isort-3 +ln -s isort-2 %{buildroot}%{_bindir}/isort + +%check +%{__python2} setup.py test +%{__python3} setup.py test + + +%files -n python2-isort +%doc README.rst *.md +%license LICENSE +%{_bindir}/isort +%{_bindir}/isort-2 +%{_bindir}/isort-%{python2_version} +%{python2_sitelib}/isort/ +%{python2_sitelib}/isort-*.egg-info/ + +%files -n python3-isort +%doc README.rst *.md +%license LICENSE +%{_bindir}/isort-3 +%{_bindir}/isort-%{python3_version} +%{python3_sitelib}/isort/ +%{python3_sitelib}/isort-*.egg-info/ + +%changelog +* Mon Feb 24 2020 Senlin Xia - 4.3.4-6 +- Package init