forked from pool/python-argcomplete
Accepting request 438953 from home:achimh
Introduced update-alternatives so package plays nice with python3 package OBS-URL: https://build.opensuse.org/request/show/438953 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=12
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 02 20:50:53 UTC 2016 - achim.herwig@wodca.de
|
||||
|
||||
- ported back from python3 package including
|
||||
introduced update-alternatives to coexist with corresponding python3 package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 12 17:49:43 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-argcomplete
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 Darin Perusich.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -28,14 +28,7 @@ Source: http://pypi.python.org/packages/source/a/argcomplete/argcomplete
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
BuildRequires: python-argparse
|
||||
Requires: python-argparse
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description
|
||||
argcomplete - Bash completion for argparse
|
||||
@@ -62,20 +55,34 @@ python setup.py build
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
rm -rf %{buildroot}%{python_sitelib}/test
|
||||
rm %{buildroot}/usr/bin/activate-global-python-argcomplete
|
||||
rm %{buildroot}/usr/bin/register-python-argcomplete
|
||||
mv %{buildroot}/usr/bin/python-argcomplete-check-easy-install-script \
|
||||
%{buildroot}/usr/bin/python-argcomplete-check-easy-install-script-%{py_ver}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||
install -p -m0644 %{buildroot}%{python_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh %{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
|
||||
|
||||
%check
|
||||
python 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
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.rst README.rst
|
||||
%{_bindir}/activate-global-python-argcomplete
|
||||
%{_bindir}/python-argcomplete-check-easy-install-script
|
||||
%{_bindir}/register-python-argcomplete
|
||||
%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
|
||||
%config %{_sysconfdir}/bash_completion.d/python-argcomplete.sh
|
||||
%{_sysconfdir}/bash_completion.d/python-argcomplete.sh
|
||||
%ghost %{_sysconfdir}/alternatives/python-argcomplete.sh
|
||||
%ghost %{_sysconfdir}/alternatives/python-argcomplete-check-easy-install-script
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user