From 59903a8394dec6af14390f777dd389a8954846048f09296595e9b6b888b01739 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 14 Jul 2021 14:50:05 +0000 Subject: [PATCH] Accepting request 906136 from home:bnavigator:branches:devel:languages:python new fork to replace the plugin for Palantir's abandoned LSP server. No conflicting namespaces. OBS-URL: https://build.opensuse.org/request/show/906136 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-black?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + python-lsp-black-1.0.0.tar.gz | 3 ++ python-python-lsp-black.changes | 7 ++++ python-python-lsp-black.spec | 69 +++++++++++++++++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-lsp-black-1.0.0.tar.gz create mode 100644 python-python-lsp-black.changes create mode 100644 python-python-lsp-black.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-lsp-black-1.0.0.tar.gz b/python-lsp-black-1.0.0.tar.gz new file mode 100644 index 0000000..7836ce7 --- /dev/null +++ b/python-lsp-black-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d7dd5f440a53b6f676fa8c097979e0ff611065b8f4ffd248b43228b0df2efee +size 3181 diff --git a/python-python-lsp-black.changes b/python-python-lsp-black.changes new file mode 100644 index 0000000..bef726d --- /dev/null +++ b/python-python-lsp-black.changes @@ -0,0 +1,7 @@ +------------------------------------------------------------------- +Tue Jul 13 12:59:29 UTC 2021 - Ben Greiner + +- Initial specfile for version 1.0.0 + * The python-lsp-server version for python-pyls-black, which was + for the python-python-language-server abandoned by upstream. + * required by spyder. diff --git a/python-python-lsp-black.spec b/python-python-lsp-black.spec new file mode 100644 index 0000000..e402ca3 --- /dev/null +++ b/python-python-lsp-black.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-python-lsp-black +# +# Copyright (c) 2021 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.0.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-rpm-macros +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module black >= 19.3b0} +BuildRequires: %{python_module python-lsp-server} +BuildRequires: %{python_module toml} +BuildRequires: %{python_module pytest} +# /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