]> git.pld-linux.org Git - packages/python3-argcomplete.git/blame - python3-argcomplete.spec
rebuild with python 3.10
[packages/python3-argcomplete.git] / python3-argcomplete.spec
CommitLineData
985bbc54
ER
1#
2# Conditional build:
0ad3784c 3%bcond_without doc # Sphinx documentation
8c859701 4%bcond_with tests # unit tests
985bbc54
ER
5
6%define module argcomplete
985bbc54 7Summary: Bash tab completion for argparse
8c859701 8Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla argparse
bbb7d273
JB
9Name: python3-%{module}
10Version: 2.0.0
0c7ee9eb 11Release: 2
985bbc54
ER
12License: Apache v2.0
13Group: Libraries/Python
8c859701 14#Source0Download: https://github.com/kislyuk/argcomplete/releases
bbb7d273
JB
15Source0: https://github.com/kislyuk/argcomplete/archive/v%{version}/%{module}-%{version}.tar.gz
16# Source0-md5: 57d492ebd86eaa4f24c1c041252b1118
c2ac89bf 17URL: https://github.com/kislyuk/argcomplete
0ad3784c
JB
18%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
19BuildRequires: glibc-localedb-all
20%endif
bbb7d273 21BuildRequires: python3-devel >= 1:3.6
1e3cd944 22BuildRequires: python3-setuptools
8c859701
JB
23%if %{with tests}
24%if "%{py3_ver}" < "3.8"
25BuildRequires: python3-importlib_metadata >= 0.23
288b6fa1 26BuildRequires: python3-importlib_metadata < 5
8c859701
JB
27%endif
28BuildRequires: python3-pexpect
29%endif
8c859701
JB
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
0ad3784c
JB
32%if %{with doc}
33BuildRequires: python3-guzzle_sphinx_theme
34BuildRequires: sphinx-pdg-3
35%endif
1e3cd944
JR
36%if %{with tests}
37BuildRequires: bash
0ad3784c
JB
38BuildRequires: fish
39BuildRequires: pip
985bbc54 40BuildRequires: tcsh
1e3cd944 41%endif
8c859701
JB
42# pkg_resources module is used from python-argcomplete-check-easy-install-script
43Requires: python-setuptools
985bbc54 44BuildArch: noarch
c2ac89bf
ER
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Argcomplete provides easy, extensible command line tab completion of
49arguments for your Python script.
50
51It makes two assumptions:
8c859701
JB
52- You are using bash as your shell
53- You are using argparse to manage your command line arguments/options
985bbc54 54
c2ac89bf
ER
55Argcomplete is particularly useful if your program has lots of options
56or subparsers, and if your program can dynamically suggest completions
57for your argument/option values (for example, if the user is browsing
58resources over the network).
985bbc54 59
8c859701
JB
60%description -l pl.UTF-8
61Argcomplete zapewnia łatwe, rozszerzalne dopełnianie tabem argumentów
62scriptów Pythona w wierszu poleceń.
63
64Czyni dwa założenia:
65- powłoką jest bash
66- skrypt używa argparse do zarządzania argumentami/opcjami linii
67 poleceń
68
69Argcomplete jest przydatne szczególnie wtedy, gdy program ma wiele
70opcji lub podparserów, albo gdy może dynamicznie podpowiadać
71dopełnienia wartości argumentów/opcji (np. kiedy użytkownik przegląda
72zasoby sieciowe).
73
bbb7d273 74%package -n bash-completion-python3-argcomplete
8c859701
JB
75Summary: Bash completion for argparse
76Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla argparse
77Group: Applications/Shells
78Requires: bash-completion >= 2.0
bbb7d273
JB
79Requires: python3-%{module} = %{version}-%{release}
80Obsoletes: bash-completion-python-argcomplete < 2
8c859701 81
bbb7d273 82%description -n bash-completion-python3-argcomplete
8c859701
JB
83Bash completion for argparse based Python scripts.
84
bbb7d273 85%description -n bash-completion-python3-argcomplete -l pl.UTF-8
8c859701
JB
86Bashowe dopełnianie parametrów dla skryptów Pythona opartych na
87argparse.
88
985bbc54 89%prep
bbb7d273 90%setup -q -n %{module}-%{version}
985bbc54 91
0ad3784c
JB
92%package apidocs
93Summary: API documentation for Python argcomplete module
94Summary(pl.UTF-8): Dokumentacja API modułu Pythona argcomplete
95Group: Documentation
96
97%description apidocs
98API documentation for Python argcomplete module.
99
100%description apidocs -l pl.UTF-8
101Dokumentacja API modułu Pythona argcomplete.
985bbc54
ER
102
103%build
8c859701 104%py3_build
8c859701
JB
105
106%if %{with tests}
107%{__python3} test/test.py
108%endif
985bbc54 109
0ad3784c
JB
110%if %{with doc}
111sphinx-build-3 -b html docs docs/_build/html
112%endif
113
985bbc54
ER
114%install
115rm -rf $RPM_BUILD_ROOT
8c859701 116
985bbc54 117%py3_install
985bbc54
ER
118
119install -d $RPM_BUILD_ROOT%{bash_compdir}
8c859701 120cp -p argcomplete/bash_completion.d/python-argcomplete $RPM_BUILD_ROOT%{bash_compdir}
985bbc54
ER
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
985bbc54
ER
125%files
126%defattr(644,root,root,755)
8c859701 127%doc Authors.rst Changes.rst README.rst
935ce037
JR
128%attr(755,root,root) %{_bindir}/activate-global-python-argcomplete
129%attr(755,root,root) %{_bindir}/python-argcomplete-check-easy-install-script
130%attr(755,root,root) %{_bindir}/python-argcomplete-tcsh
131%attr(755,root,root) %{_bindir}/register-python-argcomplete
bbb7d273
JB
132%{py3_sitescriptdir}/argcomplete
133%{py3_sitescriptdir}/argcomplete-%{version}-py*.egg-info
8c859701 134
bbb7d273 135%files -n bash-completion-python3-argcomplete
8c859701
JB
136%defattr(644,root,root,755)
137%{bash_compdir}/python-argcomplete
0ad3784c
JB
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
142%doc docs/_build/html/{_static,*.html,*.js}
143%endif
This page took 0.249185 seconds and 4 git commands to generate.