forked from pool/python-isort
* Fixed issue #654: Trailing comma count error * Fixed issue #651: Add imports option is broken * Fixed issue #650: Wrong error message displayed - update to 4.3.0 * Fixed #557: force_alphabetical_sort and force_sort_within_sections can now be utilized together without extra new lines * Added --no-lines-before for more granular control over section output * Fixed #493: Unwanted conversion to Windows line endings * Implemented --version-number to retrieve just the version number without the isort logo - Remove patch-shebang.patch and replace it with a sed-call OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=6
71 lines
2.1 KiB
RPMSpec
71 lines
2.1 KiB
RPMSpec
#
|
||
# spec file for package python-isort
|
||
#
|
||
# Copyright (c) 2018 SUSE LINUX 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/
|
||
#
|
||
|
||
|
||
%{!?license: %global license %doc}
|
||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||
Name: python-isort
|
||
Version: 4.3.1
|
||
Release: 0
|
||
Summary: A Python utility / library to sort Python imports
|
||
License: MIT
|
||
Group: Development/Languages/Python
|
||
Url: https://github.com/timothycrosley/isort
|
||
# Tests included in pypi package fail
|
||
Source: https://github.com/timothycrosley/isort/archive/%{version}.tar.gz
|
||
BuildRequires: %{python_module mock}
|
||
BuildRequires: %{python_module pytest}
|
||
BuildRequires: %{python_module setuptools}
|
||
BuildRequires: python-rpm-macros
|
||
BuildRequires: python2-futures
|
||
%ifpython2
|
||
Requires: python-futures
|
||
%endif
|
||
BuildArch: noarch
|
||
%python_subpackages
|
||
|
||
%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.7 - 3.6 without
|
||
any dependencies.
|
||
|
||
%prep
|
||
%setup -q -n isort-%{version}
|
||
sed -i '1s/^#!.*//' isort/main.py
|
||
chmod -x LICENSE
|
||
|
||
%build
|
||
%python_build
|
||
|
||
%install
|
||
%python_install
|
||
|
||
%check
|
||
%python_exec setup.py test
|
||
|
||
%files %{python_files}
|
||
%defattr(-,root,root,-)
|
||
%{python_sitelib}/*
|
||
%python3_only %{_bindir}/isort
|
||
%license LICENSE
|
||
|
||
%changelog
|