/[packages]/cauldron/python-argcomplete/current/SPECS/python-argcomplete.spec
ViewVC logotype

Annotation of /cauldron/python-argcomplete/current/SPECS/python-argcomplete.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1124464 - (hide annotations) (download)
Mon Jul 17 17:11:15 2017 UTC (6 years, 9 months ago) by mitya
File size: 2577 byte(s)
Mageify

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

  ViewVC Help
Powered by ViewVC 1.1.30