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,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 5 03:19:22 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to autosetup and pyproject macros.
- Remove python2 leftovers.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 14 21:08:37 UTC 2022 - Ben Greiner <code@bnavigator.de> Thu Jul 14 21:08:37 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-vim-vint # 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 # 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,49 +16,36 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-vim-vint Name: python-vim-vint
Version: 0.3.21 Version: 0.3.21
Release: 0 Release: 0
Summary: Lint tool for Vim script Language Summary: Lint tool for Vim script Language
License: MIT License: MIT
Group: Development/Languages/Python
URL: https://github.com/Kuniwak/vint URL: https://github.com/Kuniwak/vint
Source: https://github.com/Kuniwak/vint/archive/v%{version}.tar.gz Source: https://github.com/Kuniwak/vint/archive/v%{version}.tar.gz
Patch0: test-sys-executable.patch Patch0: test-sys-executable.patch
BuildRequires: %{python_module PyYAML >= 3.11} BuildRequires: %{python_module PyYAML >= 3.11}
BuildRequires: %{python_module ansicolor >= 0.2.4} BuildRequires: %{python_module ansicolor >= 0.2.4}
BuildRequires: %{python_module chardet >= 2.3.0} BuildRequires: %{python_module chardet >= 2.3.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 2.6.4} BuildRequires: %{python_module pytest >= 2.6.4}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-PyYAML >= 3.11 Requires: python-PyYAML >= 3.11
Requires: python-ansicolor >= 0.2.4 Requires: python-ansicolor >= 0.2.4
Requires: python-chardet >= 2.3.0 Requires: python-chardet >= 2.3.0
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun): update-alternatives
BuildArch: noarch 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 %python_subpackages
%description %description
A lint tool for the Vim script Language. A lint tool for the Vim script Language.
%prep %prep
%setup -q -n vint-%{version} %autosetup -p1 -n vint-%{version}
%patch0 -p1
sed -e 's/==/>=/g' \ sed -e 's/==/>=/g' \
-e 's/\~=/>=/g' \ -e 's/\~=/>=/g' \
-i setup.py \ -i setup.py \
@@ -67,10 +54,10 @@ sed -e 's/==/>=/g' \
sed -i -e '/^#!\//, 1d' vint/_bundles/vimlparser.py sed -i -e '/^#!\//, 1d' vint/_bundles/vimlparser.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/vint %python_clone -a %{buildroot}%{_bindir}/vint
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -91,6 +78,6 @@ rm ./test/acceptance/test_cli.py
%doc README.rst %doc README.rst
%python_alternative %{_bindir}/vint %python_alternative %{_bindir}/vint
%{python_sitelib}/vint %{python_sitelib}/vint
%{python_sitelib}/vim_vint-%{version}*-info %{python_sitelib}/vim_vint-%{version}.dist-info
%changelog %changelog