also run tests during build, rely on auto-generated requirements

This commit is contained in:
Felix Schwarz 2020-11-29 23:18:30 +01:00
parent ee88d4df05
commit b380603b4c

View File

@ -3,7 +3,7 @@
Name: python-%{pypi_name} Name: python-%{pypi_name}
# NOTICE - Updating this package requires updating python-boto3 # NOTICE - Updating this package requires updating python-boto3
Version: 1.19.24 Version: 1.19.24
Release: 1%{?dist} Release: 2%{?dist}
Summary: Low-level, data-driven core of boto 3 Summary: Low-level, data-driven core of boto 3
License: ASL 2.0 License: ASL 2.0
@ -11,16 +11,23 @@ URL: https://github.com/boto/botocore
Source0: %{pypi_source} Source0: %{pypi_source}
BuildArch: noarch BuildArch: noarch
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-jsonschema
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-setuptools
%description %description
A low-level interface to a growing number of Amazon Web Services. The A low-level interface to a growing number of Amazon Web Services. The
botocore package is the foundation for the AWS CLI as well as boto3. botocore package is the foundation for the AWS CLI as well as boto3.
%package -n python3-%{pypi_name} %package -n python3-%{pypi_name}
Summary: Low-level, data-driven core of boto 3 Summary: Low-level, data-driven core of boto 3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-%{pypi_name}} %{?python_provide:%python_provide python3-%{pypi_name}}
Requires: python3-jmespath
%description -n python3-%{pypi_name} %description -n python3-%{pypi_name}
A low-level interface to a growing number of Amazon Web Services. The A low-level interface to a growing number of Amazon Web Services. The
@ -31,20 +38,37 @@ botocore package is the foundation for the AWS CLI as well as boto3.
rm -vr %{pypi_name}.egg-info rm -vr %{pypi_name}.egg-info
# Remove online tests # Remove online tests
rm -vr tests/integration rm -vr tests/integration
# This test tried to import tests/cmd-runner which failed as the code was
# unable to import "botocore". I'm not 100% sure why this happened but for now
# just exclude this one test and run all the other functional tests.
rm -vr tests/functional/leak
%generate_buildrequires
# -r use final runtime dependencies as BuildRequires
%pyproject_buildrequires -r
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%check
cd tests
nosetests-%{python3_version} unit functional
%files -n python3-%{pypi_name} %files -n python3-%{pypi_name}
%doc README.rst %doc README.rst
%license LICENSE.txt %license LICENSE.txt
%{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/ %{python3_sitelib}/%{pypi_name}-*.dist-info/
%changelog %changelog
* Sun Nov 29 23:16:01 CET 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 1.19.24-2
- also run tests during build, rely on auto-generated requirements
* Tue Nov 24 08:24:37 CST 2020 Gwyn Ciesla <gwync@protonmail.com> - 1.19.24-1 * Tue Nov 24 08:24:37 CST 2020 Gwyn Ciesla <gwync@protonmail.com> - 1.19.24-1
- 1.19.24 - 1.19.24