diff --git a/.gitignore b/.gitignore index fdfe018..fdf58d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /python-lsp-black-1.0.0.tar.gz /python-lsp-black-1.2.0.tar.gz +/python-lsp-black-1.3.0.tar.gz diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f67ba84..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2018-2020 Rupert Bedford -Copyright (c) 2021 Python LSP contributors - -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/lift_python_version_upper_bound.patch b/lift_python_version_upper_bound.patch new file mode 100644 index 0000000..dea4989 --- /dev/null +++ b/lift_python_version_upper_bound.patch @@ -0,0 +1,13 @@ +diff --git a/setup.cfg b/setup.cfg +index e791aba..2b3c454 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -21,7 +21,7 @@ packages = find: + install_requires = + python-lsp-server>=1.4.0 + black>=22.3.0 +- tomli; python_version<'3.11' ++ tomli + python_requires = >= 3.7 + + [options.entry_points] diff --git a/python-lsp-black.spec b/python-lsp-black.spec index fea9db6..6b71c5a 100644 --- a/python-lsp-black.spec +++ b/python-lsp-black.spec @@ -1,4 +1,5 @@ %global short_name lsp-black +%global forgeurl https://github.com/python-lsp/python-lsp-black %global _description %{expand: lsp-black is a python-lsp-server plugin that adds support to black @@ -7,19 +8,21 @@ community maintained language-server (python-lsp-server). } Name: python-%{short_name} -Version: 1.2.0 +Version: 1.3.0 Release: %autorelease Summary: A python-lsp-server plugin that adds support to black autoformatter - +%forgemeta License: MIT -URL: https://github.com/python-lsp/%{name} -Source0: %{pypi_source} -Source1: LICENSE +URL: %{forgeurl} +Source0: %{forgesource} +# Enable building against Python3.12 +Patch: lift_python_version_upper_bound.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros +BuildRequires: python3-pytest %description %_description @@ -32,10 +35,11 @@ Supplements: python3dist(python-lsp-server) %prep %autosetup -n %{name}-%{version} -cp %{SOURCE1} LICENSE +# Remove version pinning from python-lsp-server dependency +sed -i -r -e 's/(lsp-server)>=.*/\1/' setup.cfg %generate_buildrequires -%pyproject_buildrequires -r +%pyproject_buildrequires -x extras_require %build %pyproject_wheel @@ -45,6 +49,9 @@ cp %{SOURCE1} LICENSE %pyproject_save_files pylsp_black +%check +%pytest -v + %files -n python3-%{short_name} -f %{pyproject_files} %license LICENSE %doc README.md diff --git a/sources b/sources index f54774a..a66dc7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-lsp-black-1.2.0.tar.gz) = 9720b8a13457f178d48aac30509a07e2e0b311c5679091dc041673c92b8e115f39b72b529e0ef01f3e5b8b8f30c5e4ca554750de1d5c344b2ba6972783db7bf5 +SHA512 (python-lsp-black-1.3.0.tar.gz) = 9e3d081ac022854626c120128949ab5e58c44f9e76ddd566e3b80a697fbc02a96f62994f43195b02f899e770768d55d223984267133eedd6f642b70560d46c09