1 |
wally |
1355928 |
%global srcname argcomplete |
2 |
mitya |
1124416 |
|
3 |
|
|
# Currently it's broken: https://github.com/kislyuk/argcomplete/issues/174 |
4 |
mitya |
1124464 |
%bcond_with check |
5 |
mitya |
1124416 |
|
6 |
wally |
1355928 |
Name: python-%{srcname} |
7 |
mitya |
1124416 |
Summary: Bash tab completion for argparse |
8 |
wally |
1355928 |
Version: 1.9.4 |
9 |
|
|
Release: %mkrel 1 |
10 |
mitya |
1124465 |
Group: Development/Python |
11 |
mitya |
1124416 |
License: ASL 2.0 |
12 |
|
|
URL: https://github.com/kislyuk/argcomplete |
13 |
wally |
1355928 |
Source0: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz |
14 |
mitya |
1124416 |
BuildArch: noarch |
15 |
|
|
|
16 |
|
|
%global _description \ |
17 |
|
|
Argcomplete provides easy, extensible command line tab completion of\ |
18 |
|
|
arguments for your Python script.\ |
19 |
|
|
\ |
20 |
|
|
It makes two assumptions:\ |
21 |
|
|
\ |
22 |
|
|
* You are using bash as your shell\ |
23 |
|
|
* You are using argparse to manage your command line arguments/options\ |
24 |
|
|
\ |
25 |
|
|
Argcomplete is particularly useful if your program has lots of\ |
26 |
|
|
options or subparsers, and if your program can dynamically suggest\ |
27 |
|
|
completions for your argument/option values (for example, if the user\ |
28 |
|
|
is browsing resources over the network). |
29 |
|
|
|
30 |
|
|
%description %{_description} |
31 |
|
|
|
32 |
wally |
1355928 |
%package -n python2-%{srcname} |
33 |
|
|
Summary: %{summary} |
34 |
|
|
Group: Development/Python |
35 |
|
|
BuildRequires: pkgconfig(python2) |
36 |
|
|
BuildRequires: python2dist(setuptools) |
37 |
|
|
%if %{with check} |
38 |
|
|
BuildRequires: python2dist(pexpect) |
39 |
|
|
BuildRequires: tcsh |
40 |
|
|
%endif |
41 |
|
|
%{?python_provide:%python_provide python2-%{srcname}} |
42 |
mitya |
1124416 |
|
43 |
wally |
1355928 |
%description -n python2-%{srcname} %{_description} |
44 |
|
|
|
45 |
|
|
%package -n python3-%{srcname} |
46 |
mitya |
1124416 |
Summary: %{summary} |
47 |
mitya |
1124465 |
Group: Development/Python |
48 |
mitya |
1124464 |
BuildRequires: pkgconfig(python3) |
49 |
wally |
1355928 |
BuildRequires: python3dist(setuptools) |
50 |
mitya |
1124416 |
%if %{with check} |
51 |
wally |
1355928 |
BuildRequires: python3dist(pexpect) |
52 |
mitya |
1124464 |
BuildRequires: tcsh |
53 |
mitya |
1124416 |
%endif |
54 |
wally |
1355928 |
%{?python_provide:%python_provide python3-%{srcname}} |
55 |
mitya |
1124464 |
|
56 |
mitya |
1124416 |
# pkg_resources module is used from python-argcomplete-check-easy-install-script |
57 |
wally |
1355928 |
Requires: python3dist(setuptools) |
58 |
mitya |
1124416 |
|
59 |
wally |
1355928 |
%description -n python3-%{srcname} %{_description} |
60 |
mitya |
1124416 |
|
61 |
wally |
1355928 |
%prep |
62 |
|
|
%autosetup -n %{srcname}-%{version} |
63 |
mitya |
1124416 |
|
64 |
wally |
1355928 |
# Drop bundled egg-info |
65 |
|
|
rm -rf %{srcname}.egg-info |
66 |
|
|
|
67 |
mitya |
1124416 |
# Remove useless BRs |
68 |
|
|
sed -i -r -e '/tests_require = /s/"(coverage|flake8|wheel)"[, ]*//g' setup.py |
69 |
|
|
|
70 |
|
|
%build |
71 |
|
|
%py2_build |
72 |
|
|
%py3_build |
73 |
|
|
|
74 |
|
|
%install |
75 |
|
|
%py2_install |
76 |
|
|
%py3_install |
77 |
wally |
1355928 |
|
78 |
mitya |
1124416 |
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ |
79 |
wally |
1355928 |
install -p -m0644 %{buildroot}%{python3_sitelib}/%{srcname}/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/ |
80 |
mitya |
1124416 |
|
81 |
|
|
%if %{with check} |
82 |
|
|
%check |
83 |
|
|
export LC_ALL=C.UTF-8 |
84 |
|
|
%{__python2} setup.py test |
85 |
|
|
%{__python3} setup.py test |
86 |
|
|
%endif |
87 |
|
|
|
88 |
wally |
1355928 |
%files -n python2-%{srcname} |
89 |
mitya |
1124416 |
%license LICENSE.rst |
90 |
|
|
%doc README.rst |
91 |
wally |
1355928 |
%{python2_sitelib}/%{srcname}-*.egg-info/ |
92 |
|
|
%{python2_sitelib}/%{srcname}/ |
93 |
mitya |
1124416 |
|
94 |
wally |
1355928 |
%files -n python3-%{srcname} |
95 |
mitya |
1124416 |
%license LICENSE.rst |
96 |
|
|
%doc README.rst |
97 |
wally |
1355928 |
%{python3_sitelib}/%{srcname}-*.egg-info/ |
98 |
|
|
%{python3_sitelib}/%{srcname}/ |
99 |
mitya |
1124416 |
%{_bindir}/activate-global-python-argcomplete |
100 |
|
|
%{_bindir}/python-argcomplete-check-easy-install-script |
101 |
|
|
%{_bindir}/python-argcomplete-tcsh |
102 |
|
|
%{_bindir}/register-python-argcomplete |
103 |
|
|
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh |