15
0

Accepting request 1136647 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1136647
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-argcomplete?expand=0&rev=31
This commit is contained in:
2024-01-05 21:59:50 +00:00
committed by Git OBS Bridge
5 changed files with 30 additions and 41 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b1f07d133332547a53c79437527c00be48cca3807b1d4ca5cab1b26313386a6
size 79685

3
argcomplete-3.2.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:437f67fb9b058da5a090df505ef9be0297c4883993f3f56cb186ff087778cfb4
size 80727

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Jan 3 10:54:17 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Remove coverage check
- Fix zsh test failures: avoid coloring terminal
-------------------------------------------------------------------
Fri Dec 29 18:27:06 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 3.2.1:
* Allow explicit zsh global completion activation (#467)
* Fix and test global completion in zsh (#463, #466)
* Add yes option to activate-global-python-argcomplete (#461)
* Test suite improvements
- drop without_zsh.patch: obsolete
-------------------------------------------------------------------
Mon Nov 27 15:26:30 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-argcomplete
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2013 Darin Perusich.
#
# All modifications and additions to the file contributed by third parties
@@ -19,26 +19,25 @@
%{?sle15_python_module_pythons}
Name: python-argcomplete
Version: 3.1.6
Version: 3.2.1
Release: 0
Summary: Bash tab completion for argparse
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/kislyuk/argcomplete
Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz
# Don't fail the test suite when zsh is not available
Patch2: without_zsh.patch
# Use correct place for auxiliary bashrc.sh file from pexpect
Patch3: bash-repl.patch
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 67.7.2}
BuildRequires: %{python_module setuptools >= 67.2}
BuildRequires: %{python_module setuptools_scm >= 6.2}
BuildRequires: %{python_module wheel}
BuildRequires: ca-certificates
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: zsh
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
@@ -62,25 +61,24 @@ resources over the network).
%autosetup -p1 -n argcomplete-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/register-python-argcomplete
%python_clone -a %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script
rm -rf %{buildroot}%{python_sitelib}/test
rm %{buildroot}%{_bindir}/activate-global-python-argcomplete
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
export TERM=xterm-mono
%{python_expand \
# https://github.com/kislyuk/argcomplete/issues/255
# https://github.com/kislyuk/argcomplete/issues/256
# https://github.com/kislyuk/argcomplete/issues/299
sed -i -e "1s|#!.*python.*|#!%{_bindir}/$python|" test/prog scripts/*
sed -i -e "1s|#!.*python.*|#!%{__$python}|" test/prog test/*.py scripts/*
sed -i -e "s|python3 |$python |g" test/test.py
PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m coverage run --source=argcomplete --omit=argcomplete/packages/_shlex.py ./test/test.py -v
PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./test/test.py -v
}
%post
@@ -94,7 +92,7 @@ export LANG=en_US.UTF-8
%files %{python_files}
%doc README.rst
%license LICENSE.rst
%{python_sitelib}/argcomplete-%{version}*-info
%{python_sitelib}/argcomplete-%{version}.dist-info
%{python_sitelib}/argcomplete
%python_alternative %{_bindir}/python-argcomplete-check-easy-install-script
%python_alternative %{_bindir}/register-python-argcomplete

View File

@@ -1,25 +0,0 @@
Index: argcomplete-3.1.6/test/test.py
===================================================================
--- argcomplete-3.1.6.orig/test/test.py
+++ argcomplete-3.1.6/test/test.py
@@ -1299,20 +1299,6 @@ class TestBash(TestBashZshBase, unittest
self.test_simple_completion()
-class TestZsh(TestBashZshBase, unittest.TestCase):
- skipped = [
- "test_parse_special_characters",
- "test_parse_special_characters_dollar",
- "test_comp_point", # FIXME
- "test_completion_environment", # FIXME
- "test_continuation", # FIXME
- "test_wordbreak_chars", # FIXME
- ]
-
- def repl_provider(self):
- return zsh_repl()
-
-
@unittest.skipIf(BASH_MAJOR_VERSION < 4, "complete -D not supported")
class TestBashGlobal(TestBash):
install_cmd = 'eval "$(activate-global-python-argcomplete --dest=-)"'