|
Fabio Alessandro Locati |
47d29d |
%if 0%{?rhel}
|
|
Fabio Alessandro Locati |
47d29d |
%global with_python3 0
|
|
Fabio Alessandro Locati |
47d29d |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
Fabio Alessandro Locati |
47d29d |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
Fabio Alessandro Locati |
47d29d |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
%global with_python3 1
|
|
Fabio Alessandro Locati |
47d29d |
%endif
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
Name: awscli
|
|
Fabio Alessandro Locati |
b6e9de |
Version: 1.9.17
|
|
Fabio Alessandro Locati |
47d29d |
Release: 1%{?dist}
|
|
Fabio Alessandro Locati |
47d29d |
Summary: Universal Command Line Environment for AWS
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
License: ASL 2.0 and MIT
|
|
Fabio Alessandro Locati |
47d29d |
URL: http://aws.amazon.com/cli
|
|
Fabio Alessandro Locati |
47d29d |
Source0: https://pypi.python.org/packages/source/a/%{name}/%{name}-%{version}.tar.gz
|
|
Fabio Alessandro Locati |
47d29d |
BuildArch: noarch
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?with_python3}
|
|
Fabio Alessandro Locati |
47d29d |
BuildRequires: python3-devel
|
|
Fabio Alessandro Locati |
47d29d |
BuildRequires: python3-setuptools
|
|
Fabio Alessandro Locati |
b6e9de |
Requires: python3-botocore = 1.3.17
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python3-bcdoc
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python3-colorama
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python3-docutils
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python3-rsa
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
BuildRequires: python2-devel
|
|
Fabio Alessandro Locati |
47d29d |
BuildRequires: python-setuptools
|
|
Fabio Alessandro Locati |
b6e9de |
Requires: python2-botocore = 1.3.17
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python-bcdoc
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python-colorama
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python-docutils
|
|
Fabio Alessandro Locati |
47d29d |
Requires: python-rsa
|
|
Fabio Alessandro Locati |
47d29d |
%endif # with_python3
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?fedora}
|
|
Fabio Alessandro Locati |
47d29d |
Recommends: bash-completion
|
|
Fabio Alessandro Locati |
47d29d |
Recommends: zsh
|
|
Fabio Alessandro Locati |
47d29d |
%endif # Fedora
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?with_python3}
|
|
Fabio Alessandro Locati |
47d29d |
%{?python_provide:%python_provide python3-%{name}}
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
%{?python_provide:%python_provide python2-%{name}}
|
|
Fabio Alessandro Locati |
47d29d |
%endif # with_python3
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%description
|
|
Fabio Alessandro Locati |
47d29d |
This package provides a unified
|
|
Fabio Alessandro Locati |
47d29d |
command line interface to Amazon Web Services.
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%prep
|
|
Fabio Alessandro Locati |
47d29d |
%setup -q -n %{name}-%{version}
|
|
Fabio Alessandro Locati |
47d29d |
rm -rf %{name}.egg-info
|
|
Fabio Alessandro Locati |
47d29d |
# Proposed upstream fix at https://github.com/aws/aws-cli/pull/1710
|
|
Fabio Alessandro Locati |
47d29d |
chmod 664 awscli/examples/*/*.rst
|
|
Fabio Alessandro Locati |
47d29d |
# Substitue the text of bin/aws_bash_completer as of https://github.com/aws/aws-cli/pull/1711
|
|
Fabio Alessandro Locati |
47d29d |
echo 'complete -C aws_completer aws' > bin/aws_bash_completer
|
|
Fabio Alessandro Locati |
47d29d |
# Non-executable file should not contain shabang as for https://github.com/aws/aws-cli/pull/1712
|
|
Fabio Alessandro Locati |
47d29d |
sed -i -e '1 d' awscli/paramfile.py
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%build
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?with_python3}
|
|
Fabio Alessandro Locati |
47d29d |
%py3_build
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
|
|
Fabio Alessandro Locati |
47d29d |
%endif # with_python3
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%install
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?with_python3}
|
|
Fabio Alessandro Locati |
47d29d |
%py3_install
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}
|
|
Fabio Alessandro Locati |
47d29d |
%endif # with_python3
|
|
Fabio Alessandro Locati |
47d29d |
# Fix path and permissions for bash completition
|
|
Fabio Alessandro Locati |
47d29d |
%global bash_completion_dir /usr/share/bash-completion/completions
|
|
Fabio Alessandro Locati |
47d29d |
mkdir -p %{buildroot}%{bash_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
mv %{buildroot}%{_bindir}/aws_bash_completer %{buildroot}%{bash_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
chmod 644 %{buildroot}%{bash_completion_dir}/aws_bash_completer
|
|
Fabio Alessandro Locati |
47d29d |
# Fix path and permissions for zsh completition
|
|
Fabio Alessandro Locati |
47d29d |
%global zsh_completion_dir /usr/share/zsh/site-functions
|
|
Fabio Alessandro Locati |
47d29d |
mkdir -p %{buildroot}%{zsh_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
mv %{buildroot}%{_bindir}/aws_zsh_completer.sh %{buildroot}%{zsh_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
chmod 644 %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh
|
|
Fabio Alessandro Locati |
47d29d |
ls -alh %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh
|
|
Fabio Alessandro Locati |
47d29d |
# We don't need the Windows CMD script
|
|
Fabio Alessandro Locati |
47d29d |
rm %{buildroot}%{_bindir}/aws.cmd
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%files
|
|
Fabio Alessandro Locati |
47d29d |
%{!?_licensedir:%global license %doc}
|
|
Fabio Alessandro Locati |
47d29d |
%doc README.rst
|
|
Fabio Alessandro Locati |
47d29d |
%license LICENSE.txt
|
|
Fabio Alessandro Locati |
47d29d |
%{_bindir}/aws
|
|
Fabio Alessandro Locati |
47d29d |
%{_bindir}/aws_completer
|
|
Fabio Alessandro Locati |
47d29d |
%dir %{bash_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
%{bash_completion_dir}/aws_bash_completer
|
|
Fabio Alessandro Locati |
47d29d |
%dir %{zsh_completion_dir}
|
|
Fabio Alessandro Locati |
47d29d |
%{zsh_completion_dir}/aws_zsh_completer.sh
|
|
Fabio Alessandro Locati |
47d29d |
%if 0%{?with_python3}
|
|
Fabio Alessandro Locati |
47d29d |
%{python3_sitelib}/awscli
|
|
Fabio Alessandro Locati |
47d29d |
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
|
|
Fabio Alessandro Locati |
47d29d |
%else
|
|
Fabio Alessandro Locati |
47d29d |
%{python2_sitelib}/awscli
|
|
Fabio Alessandro Locati |
47d29d |
%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info
|
|
Fabio Alessandro Locati |
47d29d |
%endif # with_python3
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
%changelog
|
|
Fabio Alessandro Locati |
b6e9de |
* Sun Jan 10 2016 Fabio Alessandro Locati <fabio@locati.cc> - 1.9.17-1
|
|
Fabio Alessandro Locati |
b6e9de |
- Update ro current upstream version
|
|
Fabio Alessandro Locati |
b6e9de |
- Lock the botocore dependency version
|
|
Fabio Alessandro Locati |
b6e9de |
|
|
Fabio Alessandro Locati |
47d29d |
* Sat Jan 09 2016 Fabio Alessandro Locati <fabio@locati.cc> - 1.9.16-1
|
|
Fabio Alessandro Locati |
47d29d |
- Update to current upstream version
|
|
Fabio Alessandro Locati |
47d29d |
- Add dir /usr/share/zsh
|
|
Fabio Alessandro Locati |
47d29d |
- Add dir /usr/share/zsh/site-functions
|
|
Fabio Alessandro Locati |
47d29d |
- Add MIT license (topictags.py is MIT licensed)
|
|
Fabio Alessandro Locati |
47d29d |
- Move dependency from python-devel to python2-devel
|
|
Fabio Alessandro Locati |
47d29d |
- Add Recommends lines for zsh and bsah-completion for Fedora
|
|
Fabio Alessandro Locati |
47d29d |
- Remove BuildReuires: bash-completion
|
|
Fabio Alessandro Locati |
47d29d |
- Remove the macros py2_build and py2_install to prefer the extended form
|
|
Fabio Alessandro Locati |
47d29d |
- Force non-executable bit for documentation
|
|
Fabio Alessandro Locati |
47d29d |
- Remove shabang from awscli/paramfile.py
|
|
Fabio Alessandro Locati |
47d29d |
- Fix bash completion
|
|
Fabio Alessandro Locati |
47d29d |
- Fix zsh completion
|
|
Fabio Alessandro Locati |
47d29d |
- Remove aws.cmd
|
|
Fabio Alessandro Locati |
47d29d |
|
|
Fabio Alessandro Locati |
47d29d |
* Tue Dec 29 2015 Fabio Alessandro Locati <fabio@locati.cc> - 1.9.15-1
|
|
Fabio Alessandro Locati |
47d29d |
- Initial package.
|