python-argcomplete/python-argcomplete.spec

56 lines
1.8 KiB
RPMSpec
Raw Normal View History

2019-12-23 16:17:30 +08:00
Name: python-argcomplete
Version: 1.9.5
Release: 3
2019-12-23 16:17:30 +08:00
Summary: Argparse's bash tab completion
License: ASL 2.0
URL: https://github.com/kislyuk/argcomplete
Source0: %{url}/archive/v%{version}/argcomplete-%{version}.tar.gz
BuildRequires: tcsh
BuildArch: noarch
%description
Argcomplete provides simple, extensible command line tab parameter completion for your Python scripts.
%package -n python3-argcomplete
Summary: Argparse's bash tab completion
%{?python_provide:%python_provide python3-argcomplete}
BuildRequires: python3-devel python3-setuptools python3-pexpect
Requires: python3-setuptools
%description -n python3-argcomplete
Argcomplete provides simple, extensible command line tab parameter completion for your Python scripts.
%prep
%autosetup -n argcomplete-%{version} -p1
sed -i -r -e '/tests_require = /s/"(coverage|flake8|wheel)"[, ]*//g' setup.py
sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/*
sed -i -e "s|python |python3 |" test/test.py
%build
%py3_build
%install
%py3_install
install -d %{buildroot}%{_sysconfdir}/bash_completion.d/
install -p -m0644 %{buildroot}%{python3_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh \
%{buildroot}%{_sysconfdir}/bash_completion.d/
%check
%files -n python3-argcomplete
%doc README.rst LICENSE.rst
%{python3_sitelib}/{argcomplete-*.egg-info/,argcomplete/}
%{_bindir}/{activate-global-python-argcomplete,python-argcomplete-check-easy-install-script}
%{_bindir}/{python-argcomplete-tcsh,register-python-argcomplete}
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
%changelog
* Thu May 28 2020 Jeffery.Gao <gaojianxing@huawei.com> -1.9.5-3
- Type:NA
- ID:NA
- SUG:NA
- DESC: delete setup check.
2019-12-23 16:17:30 +08:00
* Fri Dec 20 2019 fengbing <fengbing7@huawei.com> - 1.9.5-2
- Package init