🛠 Fix checks and use GitHub release source

The source from pypi does not contain the testing files for the awscli
package. Switch to the GitHub release source to ensure testing files are
included. Add a `source_name` variable to handle the dashed name in
GitHub source and the non-dashed name in the Fedora package.

Also add python3-pyyaml for testing dependencies.

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2021-04-22 07:49:12 -05:00
parent ed230f5995
commit b48cafcab5
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
3 changed files with 11 additions and 7 deletions

1
.gitignore vendored
View File

@ -372,3 +372,4 @@
/awscli-1.19.52.tar.gz
/awscli-1.19.53.tar.gz
/awscli-1.19.54.tar.gz
/1.19.54.tar.gz

View File

@ -1,3 +1,6 @@
# NOTE(mhayden): The package is awscli, but the source is aws-cli.
%define source_name aws-cli
Name: awscli
Version: 1.19.54
Release: 1%{?dist}
@ -5,7 +8,7 @@ Summary: Universal Command Line Environment for AWS
License: ASL 2.0 and MIT
URL: https://aws.amazon.com/cli/
Source0: %{pypi_source}
Source0: https://github.com/aws/aws-cli/archive/refs/tags/%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-colorama
@ -13,6 +16,7 @@ BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-mock
BuildRequires: python3-nose
BuildRequires: python3-pyyaml
BuildRequires: python3-rsa
BuildRequires: python3-s3transfer
BuildRequires: python3-setuptools
@ -30,8 +34,7 @@ This package provides a unified
command line interface to Amazon Web Services.
%prep
%autosetup -n %{name}-%{version} -p 1
rm -vr %{name}.egg-info
%autosetup -n %{source_name}-%{version} -p 1
find awscli/examples/ -type f -name '*.rst' -executable -exec chmod -x '{}' +
# https://github.com/aws/aws-cli/issues/4837

View File

@ -1 +1 @@
SHA512 (awscli-1.19.54.tar.gz) = 94d091d6c6ae7f3f489103a25b07175316b7e01455c6c4a8ccffbcd82b4f2579fb4ed101838f25eda183f875072a5012f422401fd28df0f8af360a1d0ad1b501
SHA512 (1.19.54.tar.gz) = 2e52c296e1ef5353746271c20e90c7cb50553b571c2d12d7ba257cd9fe9698f7f7b59506fffdb22685161af2cb80ce755bd41c6097d3790db147360529a303e2