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