2 %define egg_name awscli
3 %define pypi_name awscli
4 Summary: Universal Command Line Environment for AWS
8 License: ASL 2.0 and MIT
9 Group: Applications/Networking
10 Source0: https://files.pythonhosted.org/packages/source/a/awscli/%{name}-%{version}.tar.gz
11 # Source0-md5: fc606a88ba9d0e8f659c5733311db71d
12 Patch0: %{name}-relax_deps.patch
13 URL: https://aws.amazon.com/cli/
14 BuildRequires: rpm-pythonprov
15 BuildRequires: rpmbuild(macros) >= 1.719
16 BuildRequires: python3-modules >= 1:3.6
17 BuildRequires: python3-setuptools
18 Requires: python3-%{pypi_name} = %{version}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 This package provides a unified command line interface to Amazon Web
26 %package -n python3-%{pypi_name}
27 Summary: Python 3 package for awscli
28 Group: Libraries/Python
29 Requires: python3-PyYAML >= 3.10
30 Requires: python3-botocore >= 1.23.33
31 Requires: python3-colorama >= 0.2.5
32 Requires: python3-docutils >= 0.10
33 Requires: python3-modules >= 1:3.6
34 Requires: python3-rsa >= 3.1.2
35 Requires: python3-s3transfer >= 0.5
36 Obsoletes: python-awscli < 1.20.40
38 %description -n python3-%{pypi_name}
39 Python 3 package for awscli.
45 rm -r %{name}.egg-info
51 rm -rf $RPM_BUILD_ROOT
54 # We don't need the Windows CMD script
55 rm $RPM_BUILD_ROOT%{_bindir}/aws.cmd
57 # Fix path and permissions for bash completition
58 install -d $RPM_BUILD_ROOT%{bash_compdir}
59 mv $RPM_BUILD_ROOT%{_bindir}/aws_bash_completer $RPM_BUILD_ROOT%{bash_compdir}
60 # Fix path and permissions for zsh completition
61 install -d $RPM_BUILD_ROOT%{zsh_compdir}
62 mv $RPM_BUILD_ROOT%{_bindir}/aws_zsh_completer.sh $RPM_BUILD_ROOT%{zsh_compdir}
65 rm -rf $RPM_BUILD_ROOT
68 %defattr(644,root,root,755)
69 %doc README.rst LICENSE.txt
70 %attr(755,root,root) %{_bindir}/aws
71 %attr(755,root,root) %{_bindir}/aws_completer
72 %{bash_compdir}/aws_bash_completer
73 %{zsh_compdir}/aws_zsh_completer.sh
75 %files -n python3-%{pypi_name}
76 %defattr(644,root,root,755)
77 %{py3_sitescriptdir}/%{module}
78 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info