Switch to pyproject macros; drop mock requirement
The mock dependency is no longer needed. Signed-off-by: Major Hayden <major@mhtx.net>
This commit is contained in:
parent
3f48943d40
commit
4b6abc7c48
44
awscli.spec
44
awscli.spec
@ -1,3 +1,6 @@
|
||||
# Enable tests by default.
|
||||
%bcond_without tests
|
||||
|
||||
# NOTE(mhayden): The package is awscli, but the source is aws-cli.
|
||||
%global source_name aws-cli
|
||||
%global forgeurl https://github.com/aws/aws-cli/
|
||||
@ -6,7 +9,7 @@ Version: 1.23.5
|
||||
%forgemeta
|
||||
|
||||
Name: awscli
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
Summary: Universal Command Line Environment for AWS
|
||||
|
||||
@ -15,23 +18,17 @@ URL: %forgeurl
|
||||
Source0: %forgesource
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-colorama
|
||||
|
||||
Recommends: groff
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pyyaml
|
||||
BuildRequires: python3-rsa
|
||||
BuildRequires: python3-s3transfer
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pytest
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: python3dist(docutils)
|
||||
BuildRequires: python3dist(pytest)
|
||||
# Required for test_which_with_existing_command test to work,
|
||||
# which looks for /usr/bin/python.
|
||||
BuildRequires: python-unversioned-command
|
||||
Recommends: groff
|
||||
Requires: python3-docutils
|
||||
Requires: python3-colorama
|
||||
Requires: python3-s3transfer
|
||||
Requires: python3-rsa
|
||||
%endif
|
||||
|
||||
%{?python_provide:%python_provide python3-%{name}}
|
||||
|
||||
@ -65,29 +62,35 @@ sed -i s/\<5.5/\<6.5/g setup.cfg
|
||||
#remove integration tests
|
||||
rm -rf tests/integration
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files awscli
|
||||
|
||||
# Prepare shell completion scripts.
|
||||
rm -vf %{buildroot}%{_bindir}/{aws_bash_completer,aws_zsh_completer.sh,aws.cmd}
|
||||
install -Dpm0644 bin/aws_bash_completer \
|
||||
%{buildroot}%{_datadir}/bash-completion/completions/aws
|
||||
install -Dpm0644 bin/aws_zsh_completer.sh \
|
||||
%{buildroot}%{_datadir}/zsh/site-functions/_awscli
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
# Botocore in Fedora is still 1.19.x but the EMR-related tests need a newer
|
||||
# botocore version.
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%files
|
||||
%files -f %{pyproject_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/aws
|
||||
%{_bindir}/aws_completer
|
||||
%{python3_sitelib}/awscli/
|
||||
%{python3_sitelib}/%{name}-*.egg-info/
|
||||
%dir %{_datadir}/bash-completion
|
||||
%dir %{_datadir}/bash-completion/completions
|
||||
%{_datadir}/bash-completion/completions/aws
|
||||
@ -96,6 +99,9 @@ install -Dpm0644 bin/aws_zsh_completer.sh \
|
||||
%{_datadir}/zsh/site-functions/_awscli
|
||||
|
||||
%changelog
|
||||
* Wed May 04 2022 Major Hayden <major@mhtx.net> - 1.23.5-2
|
||||
- Switch to pyproject-rpm-macros and drop mock requirement.
|
||||
|
||||
* Mon May 02 2022 Gwyn Ciesla <gwync@protonmail.com> - 1.23.5-1
|
||||
- 1.23.5
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user