17
0
Files
python-rpm-spec-language-se…/python-rpm-spec-language-server.spec

92 lines
2.8 KiB
RPMSpec
Raw Permalink Normal View History

- Add %check section and run pytest - Update to version 0.0.2: * Bump version to 0.0.2 * use LABEL $name=$value instead of LABEL $name $value * use consistent capitalization: FROM $url as $name => FROM $url AS $name * ci: drop eol node versions, add supported versions * Bump locked dependencies * fix: don't hardcode the server version * Fix Tumbleweed container image build * Add pygls v2 support * Bump ruff from 0.13.3 to 0.14.1 * Bump actions/setup-node from 5.0.0 to 6.0.0 * Bump ruff from 0.13.2 to 0.13.3 * Bump specfile from 0.37.0 to 0.37.1 * Bump @vscode/vsce from 3.6.0 to 3.6.2 * Bump ruff from 0.13.1 to 0.13.2 * Bump locked dependencies * Bump mypy from 1.17.1 to 1.18.1 * Bump ruff from 0.12.12 to 0.13.0 * Bump specfile from 0.36.0 to 0.37.0 * Bump @types/node from 24.3.0 to 24.3.1 * Bump pytest from 8.4.1 to 8.4.2 * Bump twine from 6.1.0 to 6.2.0 * Bump ruff from 0.12.11 to 0.12.12 * Bump actions/setup-python from 5 to 6 * Bump actions/setup-node from 4.4.0 to 5.0.0 * Bump coverage from 7.10.5 to 7.10.6 * Bump ruff from 0.12.10 to 0.12.11 * Bump coverage from 7.10.4 to 7.10.5 * Bump ruff from 0.12.9 to 0.12.10 * Bump requests from 2.32.4 to 2.32.5 * Bump coverage from 7.10.3 to 7.10.4 * Bump @types/node from 24.2.1 to 24.3.0 * Bump ruff from 0.12.8 to 0.12.9 * Bump actions/checkout from 4 to 5 * Bump types-requests from 2.32.4.20250611 to 2.32.4.20250809 * Bump @types/node from 24.1.0 to 24.2.1 * Bump coverage from 7.10.2 to 7.10.3 * Bump ruff from 0.12.7 to 0.12.8 * Bump actions/download-artifact from 4 to 5 - Rework services configuration in _service - Add missing Require: requests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpm-spec-language-server?expand=0&rev=8
2025-10-23 10:08:30 +00:00
#
# spec file for package python-rpm-spec-language-server
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
%define skip_python39 1
%define skip_python310 1
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-rpm-spec-language-server
Version: 0.0.2
Release: 0
Summary: Language Server for RPM spec files
License: GPL-2.0-or-later
URL: https://github.com/dcermak/rpm-spec-language-server
# Source: https://files.pythonhosted.org/packages/source/r/rpm-spec-language-server/rpm_spec_language_server-%%{version}.tar.gz
Source: rpm-spec-language-server-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.9}
# SECTION test requirements
BuildRequires: %{python_module lsprotocol}
BuildRequires: %{python_module pygls}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module specfile}
BuildRequires: %{python_module typeguard}
# /SECTION
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pygls
Requires: python-requests
Requires: python-specfile
Requires: rpm
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
This is a proof of concept implementation of a server
implementing the Language Server Protocol for RPM Spec files.
%prep
%autosetup -p1 -n rpm-spec-language-server-%{version}
%build
%pyproject_wheel
%check
# Skip tests which require an internet connection
%pytest -k "not (upstream or test_cache_creation)"
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/rpm_lsp_server
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative rpm_lsp_server
%postun
%python_uninstall_alternative rpm_lsp_server
%files %{python_files}
%python_alternative %{_bindir}/rpm_lsp_server
%{python_sitelib}/rpm_spec_language_server
%{python_sitelib}/rpm_spec_language_server-%{version}.dist-info
%changelog