2021-07-14 16:49:31 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-python-lsp-server
|
|
|
|
#
|
|
|
|
# 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-server
|
2021-09-02 15:41:30 +02:00
|
|
|
Version: 1.2.2
|
2021-07-14 16:49:31 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Language Server for the Language Server Protocol
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/python-lsp/python-lsp-server
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/python-lsp-server/python-lsp-server-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools >= 39.0.0}
|
2021-09-02 15:41:30 +02:00
|
|
|
BuildRequires: python-rpm-macros >= 20210628
|
2021-07-14 16:49:31 +02:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module jedi >= 0.17.2}
|
|
|
|
BuildRequires: %{python_module PyQt5}
|
|
|
|
BuildRequires: %{python_module autopep8}
|
|
|
|
BuildRequires: %{python_module flake8 >= 3.8.0}
|
2021-08-06 01:41:14 +02:00
|
|
|
BuildRequires: %{python_module flaky}
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildRequires: %{python_module mccabe >= 0.6.0}
|
2021-08-06 01:41:14 +02:00
|
|
|
BuildRequires: %{python_module pluggy}
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildRequires: %{python_module pycodestyle >= 2.7.0}
|
|
|
|
BuildRequires: %{python_module pydocstyle >= 2.0.0}
|
|
|
|
BuildRequires: %{python_module pyflakes >= 2.3.0}
|
2021-09-02 15:41:30 +02:00
|
|
|
BuildRequires: %{python_module pylint >= 2.5.0 with %python-pylint < 2.10}
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-08-06 01:41:14 +02:00
|
|
|
BuildRequires: %{python_module python-lsp-jsonrpc >= 1.0.0}
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildRequires: %{python_module rope >= 0.10.5}
|
2021-08-06 01:41:14 +02:00
|
|
|
BuildRequires: %{python_module ujson >= 3.0.0}
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildRequires: %{python_module yapf}
|
|
|
|
BuildRequires: %{python_module matplotlib if (%python-base without python36-base)}
|
|
|
|
BuildRequires: %{python_module numpy if (%python-base without python36-base)}
|
|
|
|
BuildRequires: %{python_module pandas if (%python-base without python36-base)}
|
|
|
|
# /SECTION
|
|
|
|
BuildRequires: fdupes
|
|
|
|
Requires: python-jedi >= 0.17.2
|
|
|
|
Requires: python-pluggy
|
|
|
|
Requires: python-python-lsp-jsonrpc >= 1.0.0
|
|
|
|
Requires: python-setuptools >= 39.0.0
|
|
|
|
Requires: python-ujson >= 3.0.0
|
|
|
|
Suggests: python-autopep8
|
|
|
|
Suggests: python-flake8 >= 3.8.0
|
|
|
|
Suggests: python-mccabe >= 0.6.0
|
|
|
|
Suggests: python-pycodestyle >= 2.7.0
|
|
|
|
Suggests: python-pydocstyle >= 2.0.0
|
|
|
|
Suggests: python-pyflakes >= 2.3.0
|
2021-09-02 15:41:30 +02:00
|
|
|
Suggests: (python-pylint >= 2.5.0 with python-pylint < 2.10)
|
2021-07-14 16:49:31 +02:00
|
|
|
Suggests: python-rope >= 0.10.5
|
|
|
|
Suggests: python-yapf
|
2021-09-02 15:41:30 +02:00
|
|
|
Conflicts: python-pylint >= 2.10
|
2021-07-14 16:49:31 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun):update-alternatives
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python Language Server for the Language Server Protocol
|
|
|
|
|
|
|
|
Fork of the python-language-server project, maintained by
|
|
|
|
the Spyder IDE team and the community
|
|
|
|
|
|
|
|
If the respective recommended packages are installed, the following optional providers
|
|
|
|
will be enabled:
|
|
|
|
|
|
|
|
- Rope for Completions and renaming
|
|
|
|
- Pyflakes linter to detect various errors
|
|
|
|
- McCabe linter for complexity checking
|
|
|
|
- pycodestyle linter for style checking
|
|
|
|
- pydocstyle linter for docstring style checking (disabled by default)
|
|
|
|
- autopep8 for code formatting
|
|
|
|
- YAPF for code formatting (preferred over autopep8)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n python-lsp-server-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pylsp
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
# Remove pytest addopts
|
|
|
|
rm setup.cfg
|
|
|
|
%if 0%{?sle_version} >= 150000 && 0%{?is_opensuse}
|
|
|
|
# Test failure on Leap 15 due to mock hiccup
|
|
|
|
donttest+=" or test_flake8_config_param or test_flake8_executable_param"
|
|
|
|
%endif
|
|
|
|
# don't test numpy on python36: NEP 29
|
|
|
|
python36_donttest=" or test_numpy or test_pandas or test_matplotlib"
|
|
|
|
%pytest -ra -k "not (dummy_k_expr_start ${donttest} ${$python_donttest})" -vv
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative pylsp
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pylsp
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/pylsp
|
|
|
|
%{python_sitelib}/pylsp
|
|
|
|
%{python_sitelib}/python_lsp_server-%{version}*-info
|
|
|
|
|
|
|
|
%changelog
|