Update to 1.7.0 (RHBZ #1339845)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
0db8b3cce4
commit
5d8218dec5
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@
|
|||||||
/argcomplete-1.0.0.tar.gz
|
/argcomplete-1.0.0.tar.gz
|
||||||
/argcomplete-1.1.0.tar.gz
|
/argcomplete-1.1.0.tar.gz
|
||||||
/argcomplete-1.1.1.tar.gz
|
/argcomplete-1.1.1.tar.gz
|
||||||
|
/argcomplete-1.7.0.tar.gz
|
||||||
|
@ -1,128 +1,106 @@
|
|||||||
%global modname argcomplete
|
%global modname argcomplete
|
||||||
|
|
||||||
%if 0%{?fedora}
|
# Currently it's broken: https://github.com/kislyuk/argcomplete/issues/174
|
||||||
%global with_python3 1
|
%bcond_with check
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Summary: Bash tab completion for argparse
|
Summary: Bash tab completion for argparse
|
||||||
Version: 1.1.1
|
Version: 1.7.0
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/kislyuk/argcomplete
|
URL: https://github.com/kislyuk/argcomplete
|
||||||
Source0: http://pypi.python.org/packages/source/a/argcomplete/%{modname}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description
|
%if %{with check}
|
||||||
Argcomplete provides easy, extensible command line tab completion of
|
BuildRequires: %{_bindir}/tcsh
|
||||||
arguments for your Python script.
|
%endif
|
||||||
|
|
||||||
It makes two assumptions:
|
BuildArch: noarch
|
||||||
|
|
||||||
* You're using bash as your shell
|
%global _description \
|
||||||
* You're using argparse to manage your command line arguments/options
|
Argcomplete provides easy, extensible command line tab completion of\
|
||||||
|
arguments for your Python script.\
|
||||||
Argcomplete is particularly useful if your program has lots of
|
\
|
||||||
options or subparsers, and if your program can dynamically suggest
|
It makes two assumptions:\
|
||||||
completions for your argument/option values (for example, if the user
|
\
|
||||||
|
* You are using bash as your shell\
|
||||||
|
* You are using argparse to manage your command line arguments/options\
|
||||||
|
\
|
||||||
|
Argcomplete is particularly useful if your program has lots of\
|
||||||
|
options or subparsers, and if your program can dynamically suggest\
|
||||||
|
completions for your argument/option values (for example, if the user\
|
||||||
is browsing resources over the network).
|
is browsing resources over the network).
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
%package -n python2-%{modname}
|
%package -n python2-%{modname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
|
%if %{with check}
|
||||||
|
BuildRequires: python2-pexpect
|
||||||
|
%endif
|
||||||
|
|
||||||
%description -n python2-%{modname}
|
%description -n python2-%{modname} %{_description}
|
||||||
Argcomplete provides easy, extensible command line tab completion of
|
|
||||||
arguments for your Python script.
|
|
||||||
|
|
||||||
It makes two assumptions:
|
|
||||||
|
|
||||||
* You're using bash as your shell
|
|
||||||
* You're using argparse to manage your command line arguments/options
|
|
||||||
|
|
||||||
Argcomplete is particularly useful if your program has lots of
|
|
||||||
options or subparsers, and if your program can dynamically suggest
|
|
||||||
completions for your argument/option values (for example, if the user
|
|
||||||
is browsing resources over the network).
|
|
||||||
|
|
||||||
Python 2 version.
|
Python 2 version.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-%{modname}
|
%package -n python3-%{modname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
BuildRequires: python-tools
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
%if %{with check}
|
||||||
|
BuildRequires: python3-pexpect
|
||||||
|
%endif
|
||||||
|
# pkg_resources module is used from python-argcomplete-check-easy-install-script
|
||||||
|
Requires: python3-setuptools
|
||||||
|
|
||||||
%description -n python3-%{modname}
|
%description -n python3-%{modname} %{_description}
|
||||||
Argcomplete provides easy, extensible command line tab completion of
|
|
||||||
arguments for your Python script.
|
|
||||||
|
|
||||||
It makes two assumptions:
|
|
||||||
|
|
||||||
* You're using bash as your shell
|
|
||||||
* You're using argparse to manage your command line arguments/options
|
|
||||||
|
|
||||||
Argcomplete is particularly useful if your program has lots of
|
|
||||||
options or subparsers, and if your program can dynamically suggest
|
|
||||||
completions for your argument/option values (for example, if the user
|
|
||||||
is browsing resources over the network).
|
|
||||||
|
|
||||||
Python 3 version.
|
Python 3 version.
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{modname}-%{version}
|
%autosetup -n %{modname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_install
|
|
||||||
for file in activate-global-python-argcomplete python-argcomplete-check-easy-install-script register-python-argcomplete ; do
|
|
||||||
mv %{buildroot}%{_bindir}/$file ./$file.py3
|
|
||||||
done
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%py2_install
|
%py2_install
|
||||||
|
%py3_install
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
|
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
for file in activate-global-python-argcomplete python-argcomplete-check-easy-install-script register-python-argcomplete ; do
|
|
||||||
mv ./$file.py3 %{buildroot}%{_bindir}/$file
|
|
||||||
done
|
|
||||||
install -p -m0644 %{buildroot}%{python3_sitelib}/%{modname}/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/
|
install -p -m0644 %{buildroot}%{python3_sitelib}/%{modname}/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||||
%else
|
|
||||||
install -p -m0644 %{buildroot}%{python2_sitelib}/%{modname}/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
export LC_ALL=C.UTF-8
|
||||||
|
%{__python2} setup.py test
|
||||||
|
%{__python3} setup.py test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python2-%{modname}
|
%files -n python2-%{modname}
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python2_sitelib}/%{modname}*
|
%{python2_sitelib}/%{modname}-*.egg-info/
|
||||||
|
%{python2_sitelib}/%{modname}/
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-%{modname}
|
%files -n python3-%{modname}
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python3_sitelib}/%{modname}*
|
%{python3_sitelib}/%{modname}-*.egg-info/
|
||||||
%endif
|
%{python3_sitelib}/%{modname}/
|
||||||
|
|
||||||
# This goes in the python2-argcomplete package when we build without python3,
|
|
||||||
# otherwise it goes into the python3 subpackage
|
|
||||||
%{_bindir}/activate-global-python-argcomplete
|
%{_bindir}/activate-global-python-argcomplete
|
||||||
%{_bindir}/python-argcomplete-check-easy-install-script
|
%{_bindir}/python-argcomplete-check-easy-install-script
|
||||||
%{_bindir}/register-python-argcomplete
|
%{_bindir}/register-python-argcomplete
|
||||||
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
|
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 07 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.0-1
|
||||||
|
- Update to 1.7.0 (RHBZ #1339845)
|
||||||
|
|
||||||
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.1.1-3
|
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.1.1-3
|
||||||
- Rebuild for Python 3.6
|
- Rebuild for Python 3.6
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user