Accepting request 1301252 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/request/show/1301252 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyright?expand=0&rev=2
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 25 11:34:26 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 17 00:41:42 UTC 2024 - Guang Yee <gyee@suse.com>
|
Sat Aug 17 00:41:42 UTC 2024 - Guang Yee <gyee@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pyright
|
# spec file for package python-pyright
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,6 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyright
|
Name: python-pyright
|
||||||
Version: 1.1.376
|
Version: 1.1.376
|
||||||
@@ -24,20 +29,25 @@ Summary: Command line wrapper for pyright
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/RobertCraigie/pyright-python
|
URL: https://github.com/RobertCraigie/pyright-python
|
||||||
Source: https://github.com/RobertCraigie/pyright-python/archive/refs/tags/v%{version}.tar.gz#/pyright-%{version}.tar.gz
|
Source: https://github.com/RobertCraigie/pyright-python/archive/refs/tags/v%{version}.tar.gz#/pyright-%{version}.tar.gz
|
||||||
BuildRequires: python-rpm-macros
|
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
BuildRequires: %{python_module pytest-subprocess}
|
BuildRequires: %{python_module pytest-subprocess}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-nodeenv >= 1.6.0
|
||||||
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module nodeenv >= 1.6.0}
|
BuildRequires: %{python_module nodeenv >= 1.6.0}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildRequires: fdupes
|
%if %{with libalternatives}
|
||||||
Requires: python-nodeenv >= 1.6.0
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -62,9 +72,13 @@ Command line wrapper for pyright
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/pyright-python
|
%python_clone -a %{buildroot}%{_bindir}/pyright-python
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyright-langserver
|
%python_clone -a %{buildroot}%{_bindir}/pyright-langserver
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyright-python-langserver
|
%python_clone -a %{buildroot}%{_bindir}/pyright-python-langserver
|
||||||
|
%python_group_libalternatives pyright pyright-python pyright-langserver pyright-python-langserver
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%python_expand %fdupes %{buildroot}%{_bindir}
|
%python_expand %fdupes %{buildroot}%{_bindir}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative pyright
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative pyright pyright-python pyright-langserver pyright-python-langserver
|
%python_install_alternative pyright pyright-python pyright-langserver pyright-python-langserver
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user