3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 %define egg_name awscli
8 %define pypi_name awscli
9 Summary: Universal Command Line Environment for AWS
13 License: ASL 2.0 and MIT
14 Group: Applications/Networking
15 Source0: https://pypi.io/packages/source/a/awscli/%{name}-%{version}.tar.gz
16 # Source0-md5: 8800e388fd08a96a7b1f2ab478551bc6
17 URL: http://aws.amazon.com/cli
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.719
21 BuildRequires: python3-modules
22 BuildRequires: python3-setuptools
25 BuildRequires: python-modules
26 BuildRequires: python-setuptools
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 This package provides a unified command line interface to Amazon Web
35 %package -n python-%{pypi_name}
36 Summary: Python 2 package for awscli
37 Group: Libraries/Python
38 Requires: python-PyYAML >= 3.10
39 Requires: python-botocore = 1.9.1
40 Requires: python-colorama >= 0.2.5
41 Requires: python-docutils >= 0.10
42 Requires: python-modules
43 Requires: python-rsa >= 3.1.2
44 Requires: python-s3transfer >= 0.1.9
46 %description -n python-%{pypi_name}
47 Python 2 package for awscli.
49 %package -n python3-%{pypi_name}
50 Summary: Python 3 package for awscli
51 Group: Libraries/Python
52 Requires: python3-PyYAML >= 3.10
53 Requires: python3-botocore = 1.9.1
54 Requires: python3-colorama >= 0.2.5
55 Requires: python3-docutils >= 0.10
56 Requires: python3-modules
57 Requires: python3-rsa >= 3.1.2
58 Requires: python3-s3transfer >= 0.1.9
60 %description -n python3-%{pypi_name}
61 Python 3 package for awscli.
66 rm -r %{name}.egg-info
77 rm -rf $RPM_BUILD_ROOT
86 # We don't need the Windows CMD script
87 rm $RPM_BUILD_ROOT%{_bindir}/aws.cmd
89 # Fix path and permissions for bash completition
90 install -d $RPM_BUILD_ROOT%{bash_compdir}
91 mv $RPM_BUILD_ROOT%{_bindir}/aws_bash_completer $RPM_BUILD_ROOT%{bash_compdir}
92 # Fix path and permissions for zsh completition
93 install -d $RPM_BUILD_ROOT%{zsh_compdir}
94 mv $RPM_BUILD_ROOT%{_bindir}/aws_zsh_completer.sh $RPM_BUILD_ROOT%{zsh_compdir}
97 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc README.rst LICENSE.txt
102 %attr(755,root,root) %{_bindir}/aws
103 %attr(755,root,root) %{_bindir}/aws_completer
104 %{bash_compdir}/aws_bash_completer
105 %{zsh_compdir}/aws_zsh_completer.sh
108 %files -n python-%{pypi_name}
109 %defattr(644,root,root,755)
110 %{py_sitescriptdir}/%{module}
111 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
115 %files -n python3-%{pypi_name}
116 %defattr(644,root,root,755)
117 %{py3_sitescriptdir}/%{module}
118 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info