51 lines
1.7 KiB
RPMSpec
51 lines
1.7 KiB
RPMSpec
Name: python-argcomplete
|
|
Version: 1.9.5
|
|
Release: 2
|
|
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
|
|
%{__python3} setup.py test
|
|
|
|
%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
|
|
* Fri Dec 20 2019 fengbing <fengbing7@huawei.com> - 1.9.5-2
|
|
- Package init
|