Switch to pyproject-rpm-macros
Make updates a little easier by switching to pyproject-rpm-macros for
packaging. Also remove the python-mock requirement since it is no longer
needed for testing and it makes for easier backporting to epel9 (which
is one of my eventual goals). 😉
Signed-off-by: Major Hayden <major@mhtx.net>
This commit is contained in:
parent
9a150be9cd
commit
e731a02349
@ -4,7 +4,7 @@ S3transfer is a Python library for managing Amazon S3 transfers.
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.5.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Amazon S3 Transfer Manager
|
||||
|
||||
License: ASL 2.0
|
||||
@ -19,12 +19,10 @@ BuildArch: noarch
|
||||
Summary: %{summary}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
# required to run the test suite
|
||||
BuildRequires: python3-botocore >= 1.12.36
|
||||
BuildRequires: python3-botocore < 2.0
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3dist(botocore) >= 1.12.36
|
||||
BuildRequires: python3dist(botocore) < 2.0
|
||||
BuildRequires: python3dist(pytest)
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
|
||||
@ -32,25 +30,29 @@ Python 3 version.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
rm -vrf *.egg-info
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files %{srcname}
|
||||
|
||||
%check
|
||||
cd tests
|
||||
pytest-%{python3_version} unit functional
|
||||
%pytest tests/unit tests/functional
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
%files -n python3-%{srcname} -f %{pyproject_files}
|
||||
%license LICENSE.txt
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{srcname}/
|
||||
%{python3_sitelib}/%{srcname}-*.egg-info/
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue May 10 2022 Major Hayden <major@mhtx.net> - 0.5.2-2
|
||||
- Switch to pyproject-rpm-macros.
|
||||
|
||||
* Fri Feb 25 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.5.2-1
|
||||
- 0.5.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user