14
0

- Use python_clone and alternatives to provide the executable.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyupgrade?expand=0&rev=10
This commit is contained in:
Sebastian Wagner
2021-01-23 15:26:19 +00:00
committed by Git OBS Bridge
parent 661bb22e77
commit 5479b404ce
2 changed files with 16 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Jan 23 15:25:51 UTC 2021 - Sebastian Wagner <sebix+novell.com@sebix.at>
- Use python_clone and alternatives to provide the executable.
-------------------------------------------------------------------
Wed Nov 25 20:49:51 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyupgrade
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -35,6 +35,8 @@ BuildRequires: %{python_module tokenize-rt >= 3.2.0}
# /SECTION
BuildRequires: fdupes
Requires: python-tokenize-rt >= 3.2.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -51,14 +53,21 @@ A tool to automatically upgrade syntax for newer versions.
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/pyupgrade
%check
%pytest
%post
%python_install_alternative pyupgrade
%postun
%python_uninstall_alternative pyupgrade
%files %{python_files}
%doc README.md
%license LICENSE
%python3_only %{_bindir}/pyupgrade
%python_alternative %{_bindir}/pyupgrade
%{python_sitelib}/*
%changelog