14
0

- Switch to autosetup and pyproject macros.

- Remove python2 leftovers.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vim-vint?expand=0&rev=14
This commit is contained in:
2024-03-05 03:21:43 +00:00
committed by Git OBS Bridge
parent 9b37bbd744
commit d0a7ba3f12
2 changed files with 14 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-vim-vint
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,49 +16,36 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-vim-vint
Version: 0.3.21
Release: 0
Summary: Lint tool for Vim script Language
License: MIT
Group: Development/Languages/Python
URL: https://github.com/Kuniwak/vint
Source: https://github.com/Kuniwak/vint/archive/v%{version}.tar.gz
Patch0: test-sys-executable.patch
BuildRequires: %{python_module PyYAML >= 3.11}
BuildRequires: %{python_module ansicolor >= 0.2.4}
BuildRequires: %{python_module chardet >= 2.3.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 2.6.4}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-PyYAML >= 3.11
Requires: python-ansicolor >= 0.2.4
Requires: python-chardet >= 2.3.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%if %{with python2}
BuildRequires: python-enum34 >= 1.0.4
BuildRequires: python-mock >= 1.0.1
BuildRequires: python-pathlib
BuildRequires: python-typing >= 3.6.2
%endif
%ifpython2
Requires: python-enum34 >= 1.0.4
Requires: python-pathlib >= 1.0.1
Requires: python-typing >= 3.6.2
%endif
%python_subpackages
%description
A lint tool for the Vim script Language.
%prep
%setup -q -n vint-%{version}
%patch0 -p1
%autosetup -p1 -n vint-%{version}
sed -e 's/==/>=/g' \
-e 's/\~=/>=/g' \
-i setup.py \
@@ -67,10 +54,10 @@ sed -e 's/==/>=/g' \
sed -i -e '/^#!\//, 1d' vint/_bundles/vimlparser.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/vint
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -91,6 +78,6 @@ rm ./test/acceptance/test_cli.py
%doc README.rst
%python_alternative %{_bindir}/vint
%{python_sitelib}/vint
%{python_sitelib}/vim_vint-%{version}*-info
%{python_sitelib}/vim_vint-%{version}.dist-info
%changelog