Blame python-pyls_black.spec

a55035e
%global pypi_name pyls_black
a55035e
a55035e
%global _description %{expand:
a55035e
Black plugin for the Python Language Server. pyls-black can either format an 
a55035e
entire file or just the selected text. The code will only be formatted if 
a55035e
it is syntactically valid Python. Text selections are treated as if they 
a55035e
were a separate Python file.
a55035e
}
a55035e
a55035e
Name:           python-%{pypi_name}
a55035e
Version:        0.4.6
b3db530
Release:        2%{?dist}
a55035e
Summary:        Black plugin for the Python Language Server
a55035e
a55035e
License:        MIT
a55035e
URL:            https://github.com/rupert/pyls-black
a55035e
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/pyls-black-%{version}.tar.gz
a55035e
a55035e
# license file not present in pypi tarball
a55035e
Source1:        LICENSE
a55035e
BuildArch:      noarch
a55035e
a55035e
BuildRequires:  python3-devel
a55035e
BuildRequires:  python3dist(flake8)
a55035e
BuildRequires:  python3dist(isort)
a55035e
BuildRequires:  python3dist(pytest)
a55035e
BuildRequires:  python3dist(setuptools)
a55035e
a55035e
%description
a55035e
%_description
a55035e
a55035e
%package -n     python3-%{pypi_name}
a55035e
Summary:        %{summary}
a55035e
%{?python_provide:%python_provide python3-%{pypi_name}}
a55035e
a55035e
Requires:       python3dist(black)
a55035e
Requires:       python3dist(python-language-server)
a55035e
Requires:       python3dist(setuptools)
a55035e
a55035e
%description -n python3-%{pypi_name}
a55035e
%_description
a55035e
a55035e
a55035e
%prep
a55035e
%autosetup -n pyls-black-%{version}
a55035e
# Remove bundled egg-info
a55035e
rm -rf %{pypi_name}.egg-info
a55035e
a55035e
%build
a55035e
%py3_build
a55035e
a55035e
%install
a55035e
%py3_install
a55035e
a55035e
# install license
a55035e
mkdir -p %{buildroot}%{_datadir}/licenses/python3-%{pypi_name}
a55035e
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/licenses/python3-%{pypi_name}
a55035e
a55035e
%files -n python3-%{pypi_name}
a55035e
%license LICENSE
a55035e
%doc README.md
a55035e
%{python3_sitelib}/%{pypi_name}
a55035e
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
a55035e
a55035e
%changelog
b3db530
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.6-2
b3db530
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b3db530
a55035e
* Thu Nov 26 2020 Mukundan Ragavan <nonamedotc@gmail.com> - 0.4.6-1
a55035e
- Initial package.