Switch to the GitHub source archive and run the unit and functional tests

This commit is contained in:
Benjamin A. Beasley 2023-12-24 11:34:08 -05:00
parent c454186645
commit 3b1e12e965
2 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,5 @@
%bcond tests 1
Name: python-boto3 Name: python-boto3
Version: 1.34.11 Version: 1.34.11
Release: 2%{?dist} Release: 2%{?dist}
@ -5,7 +7,7 @@ Summary: The AWS SDK for Python
License: Apache-2.0 License: Apache-2.0
URL: https://github.com/boto/boto3 URL: https://github.com/boto/boto3
Source: %{pypi_source boto3} Source: %{url}/archive/%{version}/boto3-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python3-devel
@ -13,6 +15,15 @@ BuildRequires: python3-devel
# Save space by hardlinking duplicate JSON resource files # Save space by hardlinking duplicate JSON resource files
BuildRequires: hardlink BuildRequires: hardlink
%if %{with tests}
# Test dependencies are in requirements-dev.txt; most are Window-specific or
# are for coverage analysis and are undesired, so we list those we need
# manually:
BuildRequires: %{py3_dist pytest}
# Run tests in parallel. Tests are numerous and painfully slow, so this helps!
BuildRequires: %{py3_dist pytest-xdist}
%endif
%global _description %{expand: %global _description %{expand:
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
Python, which allows Python developers to write software that makes use of Python, which allows Python developers to write software that makes use of
@ -23,8 +34,8 @@ services like Amazon S3 and Amazon EC2.}
%package -n python3-boto3 %package -n python3-boto3
Summary: %{summary} Summary: %{summary}
# Optional dependencies for import “smoke test”: # Optional dependency that enables additional functionality and additional
# # tests, and is needed for the import-only “smoke test”:
# boto3-1.34.7/boto3/s3/transfer.py # boto3-1.34.7/boto3/s3/transfer.py
# 185: # This feature requires awscrt>=0.19.18 # 185: # This feature requires awscrt>=0.19.18
BuildRequires: %{py3_dist awscrt} >= 0.19.18 BuildRequires: %{py3_dist awscrt} >= 0.19.18
@ -34,8 +45,9 @@ Recommends: %{py3_dist awscrt} >= 0.19.18
%prep %prep
%setup -q -n boto3-%{version} %setup -q -n boto3-%{version}
# Remove online tests # Remove a bundled and pre-compiled/pre-minified JavaScript library. It would
rm -rf tests/integration # be used for the generated HTML documentation, which we do not package.
rm -v docs/source/_static/shortbreadv1.js
%generate_buildrequires %generate_buildrequires
%pyproject_buildrequires %pyproject_buildrequires
@ -53,9 +65,15 @@ hardlink -c '%{buildroot}%{python3_sitelib}/boto3'
%pyproject_save_files boto3 %pyproject_save_files boto3
%check %check
%if %{with tests}
# Integration tests require network access and real AWS resources.
%pytest --ignore=tests/integration -v -n auto
%else
%pyproject_check_import %pyproject_check_import
%endif
%files -n python3-boto3 -f %{pyproject_files} %files -n python3-boto3 -f %{pyproject_files}
%doc CHANGELOG.rst
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
@ -69,6 +87,7 @@ hardlink -c '%{buildroot}%{python3_sitelib}/boto3'
- Port to pyproject-rpm-macros - Port to pyproject-rpm-macros
- Save space by hardlinking duplicate JSON resource files - Save space by hardlinking duplicate JSON resource files
- Add a weak dependency on python3-awscrt - Add a weak dependency on python3-awscrt
- Switch to the GitHub source archive and run the unit and functional tests
* Tue Jan 02 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.34.11-1 * Tue Jan 02 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.34.11-1
- 1.34.11 - 1.34.11

View File

@ -1 +1 @@
SHA512 (boto3-1.34.11.tar.gz) = 7a6fd58acae0ad77dfd3849440f2be2f9e8c906becf6253908d7f2c6dd4699e5ce4278dc0ca1739309cede51f2ff55a13fdee0936dcf3562257c2a2a1f84e647 SHA512 (boto3-1.34.11.tar.gz) = 82b1920f1a5ad0e23364815a6b0552efceb7f49e17e585370917f63c1b74ea746eddc4f3d8c055d1eac7ca1cdbe5ac2bd304ce66e2ee12edf75ea2e261e88c56