# # spec file for package python-isort # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-isort Version: 4.2.5 Release: 1.1 Url: https://pypi.python.org/pypi/isort Summary: A Python utility / library to sort Python imports. License: BSD-3-Clause Group: Development/Languages/Python Source: https://pypi.python.org/packages/source/i/isort-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %description isort your python imports for you so you don’t have to. isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections. It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports. It currently cleanly supports Python 2.6 - 3.5 using pies to achieve this without ugly hacks and/or py2to3. %prep %setup -q -n isort-%{version} %build python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} mv %{buildroot}%{_bindir}/isort %{buildroot}%{_bindir}/isort-%{py_ver} pushd %{buildroot}%{_bindir} ln -s -f isort-%{py_ver} isort popd %fdupes %{buildroot}%{_prefix} %files %defattr(-,root,root,-) %doc README.rst %{_bindir}/isort %{_bindir}/isort-%{py_ver} %{python_sitelib}/* %changelog