Blame python-lsp-black.spec

10c332b
%global short_name lsp-black
8290de6
%global forgeurl https://github.com/python-lsp/python-lsp-black
10c332b
10c332b
%global _description %{expand:
10c332b
lsp-black is a python-lsp-server plugin that adds support to black
10c332b
autoformatter. This is forked from pyls-black to be compatible wth
10c332b
community maintained language-server (python-lsp-server).
10c332b
}
10c332b
10c332b
Name:           python-%{short_name}
26ea15b
Version:        2.0.0
0939192
Release:        %autorelease
10c332b
Summary:        A python-lsp-server plugin that adds support to black autoformatter
8290de6
%forgemeta
10c332b
License:        MIT
8290de6
URL:            %{forgeurl}
8290de6
Source0:        %{forgesource}
10c332b
10c332b
BuildArch:      noarch
10c332b
10c332b
BuildRequires:  python3-devel
10c332b
BuildRequires:  pyproject-rpm-macros
8290de6
BuildRequires:  python3-pytest
10c332b
10c332b
%description %_description
10c332b
10c332b
%package -n     python3-%{short_name}
10c332b
Summary:        %{summary}
10c332b
10c332b
Supplements:    python3dist(python-lsp-server)
10c332b
10c332b
%description -n python3-%{short_name} %_description
10c332b
10c332b
%prep
10c332b
%autosetup -n %{name}-%{version}
8290de6
# Remove version pinning from python-lsp-server dependency
8290de6
sed -i -r -e 's/(lsp-server)>=.*/\1/' setup.cfg
26ea15b
# Remove Python version upper bound
26ea15b
sed -i -e 's/; python_version.*//' setup.cfg
10c332b
10c332b
%generate_buildrequires
8290de6
%pyproject_buildrequires -x extras_require
10c332b
10c332b
%build
10c332b
%pyproject_wheel
10c332b
10c332b
%install
10c332b
%pyproject_install
10c332b
10c332b
%pyproject_save_files pylsp_black
10c332b
8290de6
%check
8290de6
%pytest -v
8290de6
10c332b
%files -n python3-%{short_name} -f %{pyproject_files}
10c332b
%license LICENSE
10c332b
%doc README.md
10c332b
10c332b
%changelog
0939192
%autochangelog