File python-pylsp-isort.spec of Package python-pylsp-isort
#
# spec file for package python-pylsp-isort
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define modname pyls-isort
Name: python-pylsp-isort
Version: 0.2.2
Release: 0
Summary: Isort plugin for python-language-server
License: MIT
URL: https://github.com/paradoxxxzero/pyls-isort
Source: https://github.com/paradoxxxzero/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module python-lsp-server}
BuildRequires: %{python_module isort}
# /SECTION
BuildRequires: fdupes
Requires: python-isort
Requires: python-python-lsp-server
BuildArch: noarch
%python_subpackages
%description
Isort plugin for python-lsp-server.
Sort your imports when formatting your code with isort.
%prep
%autosetup -p1 -n pyls-isort-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%{python_expand rm -rf %{buildroot}%{$python_sitelib}/test
%fdupes %{buildroot}%{$python_sitelib}
}
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/pyls_isort*
%changelog