Update to 1.12.0, cleaner spec

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1856103
This commit is contained in:
Miro Hrončok 2020-07-24 14:30:37 +02:00
parent 17c3130bd6
commit d403edb19a
4 changed files with 35 additions and 55 deletions

1
.gitignore vendored
View File

@ -19,3 +19,4 @@
/argcomplete-1.9.5.tar.gz /argcomplete-1.9.5.tar.gz
/argcomplete-1.10.0.tar.gz /argcomplete-1.10.0.tar.gz
/argcomplete-1.11.1.tar.gz /argcomplete-1.11.1.tar.gz
/argcomplete-1.12.0.tar.gz

View File

@ -1,12 +0,0 @@
diff --git a/test/test.py b/test/test.py
index b57d5dc..febb91f 100755
--- a/test/test.py
+++ b/test/test.py
@@ -1251,7 +1251,6 @@ class TestFish(_TestSh, unittest.TestCase):
expected_failures = [
'test_parse_special_characters',
'test_comp_point',
- 'test_special_characters_double_quoted'
]
skipped = [

View File

@ -1,63 +1,50 @@
%global modname argcomplete
%bcond_without check %bcond_without check
Name: python-%{modname} Name: python-argcomplete
Summary: Bash tab completion for argparse Summary: Bash tab completion for argparse
Version: 1.11.1 Version: 1.12.0
Release: 2%{?dist} Release: 1%{?dist}
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/kislyuk/argcomplete URL: https://github.com/kislyuk/argcomplete
Source0: %pypi_source argcomplete Source0: %pypi_source argcomplete
# Fish 3.1+ compatibility, don't xfail test_special_characters_double_quoted BuildRequires: python3-devel
# https://bugzilla.redhat.com/show_bug.cgi?id=1808322 BuildRequires: python3-setuptools
# https://github.com/kislyuk/argcomplete/issues/290
Patch1: fish3.1.patch
%if %{with check} %if %{with check}
BuildRequires: tcsh BuildRequires: tcsh
BuildRequires: fish BuildRequires: fish
BuildRequires: /usr/bin/pip BuildRequires: /usr/bin/pip
BuildRequires: python3-pexpect
%endif %endif
BuildArch: noarch BuildArch: noarch
%global _description \ %global _description %{expand:
Argcomplete provides easy, extensible command line tab completion of\ Argcomplete provides easy, extensible command line tab completion of
arguments for your Python script.\ arguments for your Python script.
\
It makes two assumptions:\
\
* You are using bash as your shell\
* You are using argparse to manage your command line arguments/options\
\
Argcomplete is particularly useful if your program has lots of\
options or subparsers, and if your program can dynamically suggest\
completions for your argument/option values (for example, if the user\
is browsing resources over the network).
%description %{_description} It makes two assumptions:
%package -n python3-%{modname} * You are using bash as your shell
* You are using argparse to manage your command line arguments/options
Argcomplete is particularly useful if your program has lots of
options or subparsers, and if your program can dynamically suggest
completions for your argument/option values (for example, if the user
is browsing resources over the network).}
%description %_description
%package -n python3-argcomplete
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}} %description -n python3-argcomplete %_description
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with check}
BuildRequires: python3-pexpect
%endif
# pkg_resources module is used from python-argcomplete-check-easy-install-script
Requires: python3-setuptools
%description -n python3-%{modname} %{_description}
Python 3 version.
%prep %prep
%autosetup -p1 -n %{modname}-%{version} %autosetup -p1 -n argcomplete-%{version}
# Remove useless BRs # Remove useless BRs
sed -i -r -e '/tests_require = /s/"(coverage|flake8|wheel)"[, ]*//g' setup.py sed -i -r -e '/tests_require = /s/"(coverage|flake8|wheel)"[, ]*//g' setup.py
# https://github.com/kislyuk/argcomplete/issues/255 # https://github.com/kislyuk/argcomplete/issues/255
# https://github.com/kislyuk/argcomplete/issues/256 # https://github.com/kislyuk/argcomplete/issues/256
sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/* sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/*
@ -69,18 +56,18 @@ sed -i -e "s|python |python3 |" test/test.py
%install %install
%py3_install %py3_install
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
install -p -m0644 %{buildroot}%{python3_sitelib}/%{modname}/bash_completion.d/python-argcomplete %{buildroot}%{_sysconfdir}/bash_completion.d/ install -p -m0644 %{buildroot}%{python3_sitelib}/argcomplete/bash_completion.d/python-argcomplete %{buildroot}%{_sysconfdir}/bash_completion.d/
%if %{with check} %if %{with check}
%check %check
%{__python3} setup.py test %{python3} setup.py test
%endif %endif
%files -n python3-%{modname} %files -n python3-argcomplete
%license LICENSE.rst %license LICENSE.rst
%doc README.rst %doc README.rst
%{python3_sitelib}/%{modname}-*.egg-info/ %{python3_sitelib}/argcomplete-*.egg-info/
%{python3_sitelib}/%{modname}/ %{python3_sitelib}/argcomplete/
%{_bindir}/activate-global-python-argcomplete %{_bindir}/activate-global-python-argcomplete
%{_bindir}/python-argcomplete-check-easy-install-script %{_bindir}/python-argcomplete-check-easy-install-script
%{_bindir}/python-argcomplete-tcsh %{_bindir}/python-argcomplete-tcsh
@ -88,6 +75,10 @@ install -p -m0644 %{buildroot}%{python3_sitelib}/%{modname}/bash_completion.d/py
%{_sysconfdir}/bash_completion.d/python-argcomplete %{_sysconfdir}/bash_completion.d/python-argcomplete
%changelog %changelog
* Fri Jul 24 2020 Miro Hrončok <mhroncok@redhat.com> - 1.12.0-1
- Update to 1.12.0
- Fixes rhbz#1856103
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.11.1-2 * Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.11.1-2
- Rebuilt for Python 3.9 - Rebuilt for Python 3.9

View File

@ -1 +1 @@
SHA512 (argcomplete-1.11.1.tar.gz) = 523d542cf1430d8ad7b056e3b9c52769847c6e0bb9e266d71cc961e56816b7811f488a5c412f89b8de0d022a321d74733af87a50b3c0d698e796fb5e322d16ce SHA512 (argcomplete-1.12.0.tar.gz) = 5e21e3caf1dcee661c0dadf28d7b127147325475fe3ae569fae8797a762c34b55125df9f52de8d76f0aa6dd4efdac260a358b325a7659beae02b1dedab501c18