15
0

Accepting request 531226 from home:glaubitz:branches:devel:languages:python

- Update to latest upstream version
- Fix issues after singlespec auto-conversion
- singlespec auto-conversion

OBS-URL: https://build.opensuse.org/request/show/531226
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=17
This commit is contained in:
Jan Matejek
2017-10-04 14:02:59 +00:00
committed by Git OBS Bridge
parent 6c41accd1f
commit e7703e90b9
5 changed files with 106 additions and 47 deletions

View File

@@ -18,8 +18,9 @@
%{!?license: %global license %doc}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-argcomplete
Version: 1.8.2
Version: 1.9.2
Release: 0
Summary: Bash tab completion for argparse
License: Apache-2.0
@@ -27,18 +28,18 @@ Group: Development/Languages/Python
Url: https://github.com/kislyuk/argcomplete
Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz
Patch0: skip_tcsh_tests.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION tests
BuildRequires: python-coverage
BuildRequires: python-flake8
BuildRequires: python-pexpect
BuildRequires: python-wheel
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module wheel}
# END SECTIONS tests
Requires: python-wheel
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Argcomplete provides easy, extensible command line tab completion of
@@ -56,46 +57,37 @@ resources over the network).
%prep
%setup -q -n argcomplete-%{version}
%patch0
%patch0 -p1
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
rm -rf %{buildroot}%{python_sitelib}/test
rm %{buildroot}%{_bindir}/activate-global-python-argcomplete
rm %{buildroot}%{_bindir}/register-python-argcomplete
mv %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script \
%{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version}
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
ln -sf %{_sysconfdir}/alternatives/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/
ln -sf %{_sysconfdir}/alternatives/python-argcomplete-check-easy-install-script %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script
%python_clone %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script
%python_clone %{buildroot}%{_bindir}/register-python-argcomplete
install -DTm644 %{buildroot}%{python_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
%python_clone %{buildroot}%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
# tcsh support is broken
rm %{buildroot}%{_bindir}/python-argcomplete-tcsh
sed -i 's/^#!\/usr\/bin\/python$/#!\/usr\/bin\/python2/' %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version}
%check
export LANG=en_US.UTF-8
python setup.py test
%python_exec setup.py test
%post
update-alternatives \
--install %{_sysconfdir}/bash_completion.d/python-argcomplete.sh python-argcomplete.sh \
%{python_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh 20 \
--slave %{_bindir}/python-argcomplete-check-easy-install-script \
python-argcomplete-check-easy-install-script \
%{_bindir}/python-argcomplete-check-easy-install-script-%{py_ver}
%files
%files %{python_files}
%defattr(-,root,root)
%doc README.rst
%license LICENSE.rst
%ghost %{_bindir}/python-argcomplete-check-easy-install-script
%{_bindir}/python-argcomplete-check-easy-install-script-%{py_ver}
%{python_sitelib}/argcomplete-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/argcomplete-%{version}-py%{python_version}.egg-info
%{python_sitelib}/argcomplete
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
%ghost %{_sysconfdir}/alternatives/python-argcomplete.sh
%ghost %{_sysconfdir}/alternatives/python-argcomplete-check-easy-install-script
%python3_only %{_bindir}/python-argcomplete-check-easy-install-script
%python3_only %{_bindir}/register-python-argcomplete
%python3_only %{_sysconfdir}/bash_completion.d/python-argcomplete.sh
%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version}
%{_bindir}/register-python-argcomplete-%{python_version}
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh-%{python_version}
%changelog