diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b056ad3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pyls-black-0.4.6.tar.gz diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7fe06e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Rupert Bedford + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/python-pyls_black.spec b/python-pyls_black.spec new file mode 100644 index 0000000..fb1a5b6 --- /dev/null +++ b/python-pyls_black.spec @@ -0,0 +1,67 @@ +%global pypi_name pyls_black + +%global _description %{expand: +Black plugin for the Python Language Server. 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. +} + +Name: python-%{pypi_name} +Version: 0.4.6 +Release: 1%{?dist} +Summary: Black plugin for the Python Language Server + +License: MIT +URL: https://github.com/rupert/pyls-black +Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/pyls-black-%{version}.tar.gz + +# license file not present in pypi tarball +Source1: LICENSE +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(flake8) +BuildRequires: python3dist(isort) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(setuptools) + +%description +%_description + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(black) +Requires: python3dist(python-language-server) +Requires: python3dist(setuptools) + +%description -n python3-%{pypi_name} +%_description + + +%prep +%autosetup -n pyls-black-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%install +%py3_install + +# install license +mkdir -p %{buildroot}%{_datadir}/licenses/python3-%{pypi_name} +install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/licenses/python3-%{pypi_name} + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Thu Nov 26 2020 Mukundan Ragavan - 0.4.6-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..0dba4b3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pyls-black-0.4.6.tar.gz) = d41042c971e567ffb9d8de3e34982f8313ce43219e7598e5aa8b1dcce5fb278e4fd846a0abdfa9e39c7bfa5535462d984d5a2f672906a772bad003d4507c4ae0