14
0
Files
python-python-lsp-black/python-python-lsp-black.spec
Benjamin Greiner 4a6b3f8dd4 Accepting request 968060 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 1.2.0
  * This release fixes formatting of Python files with non-UNIX
    line endings, adds plugin configuration support and black
    configuration caching to improve performance.
  * Official support for Python 3.10 by @wlcx (PR 31).
  * Correctly format files and ranges with line endings other than
    LF by @ccordoba12 (PR 28).
  * Plugin configuration support and black configuration caching by
    @ccordoba12 and @haplo (PR 26).
  * Fixed PyPI badge in Readme (PR 32).
  * Updated pre-commit hooks' versions (PR 33).

OBS-URL: https://build.opensuse.org/request/show/968060
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-black?expand=0&rev=5
2022-04-09 21:21:30 +00:00

71 lines
2.4 KiB
RPMSpec

#
# spec file for package python-python-lsp-black
#
# 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() python3-%{**}}
%define skip_python2 1
Name: python-python-lsp-black
Version: 1.2.0
Release: 0
Summary: Black plugin for the Python LSP Server
License: MIT
URL: https://github.com/python-lsp/python-lsp-black
Source: https://files.pythonhosted.org/packages/source/p/python-lsp-black/python-lsp-black-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module black >= 22.1.0}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-lsp-server >= 1.4.0}
BuildRequires: %{python_module toml}
# /SECTION
BuildRequires: fdupes
Requires: python-black >= 19.3b0
Requires: python-python-lsp-server
Requires: python-toml
BuildArch: noarch
%python_subpackages
%description
Black plugin for the Python LSP Server
To avoid unexpected results you should make sure yapf and autopep8 are not installed.
- pyls-black can either format an entire file or just the selected text.
- The code will only be formatted if it is syntactically valid Python.
- Text selections are treated as if they were a separate Python file.
Unfortunately this means you can't format an indented block of code.
- python-lsp-black will use your project's pyproject.toml if it has one.
%prep
%setup -q -n python-lsp-black-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc README.md
%{python_sitelib}/pylsp_black
%{python_sitelib}/python_lsp_black-%{version}*-info
%changelog